5216-expeditionStateAdd #1717

Merged
jorgep merged 14 commits from 5216-expeditionStateAdd into dev 2023-08-25 13:06:31 +00:00
Member

Hay un par de test e2e que fallan, pero no están relacionados con mi tarea.

Hay un par de test e2e que fallan, pero no están relacionados con mi tarea.
jorgep added the
CR / Tests passed
label 2023-08-24 08:03:10 +00:00
jorgep added 9 commits 2023-08-24 08:03:12 +00:00
jorgep requested review from alexm 2023-08-24 08:03:20 +00:00
alexm requested changes 2023-08-24 08:43:37 +00:00
@ -0,0 +1,2 @@
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
Member

Version nueva

Version nueva
jorgep marked this conversation as resolved
@ -0,0 +46,4 @@
const typeFk = expeditionStateType.id;
const existsExpedition = await models.Expedition.findOne({
Member

No hace falta validar si existe o no la expedición. Dado que la tabla deberia tener una FK. Entonces al hacer el create si no exite ya te dara un fallo.
Si quires si que puedes validar que expeditionStateType no sea null

Tampoco entiendo pq lo has querido hacer con promesas, hazlo con await i al estar usando la misma transaccion te las va a tirar a atras. Incluso si se quiere se puede hacer que cada iteracion del bucle tenga su propia transaccion y solo te deshaga la que ha fallado y te matenga las otras

No hace falta validar si existe o no la expedición. Dado que la tabla deberia tener una FK. Entonces al hacer el create si no exite ya te dara un fallo. Si quires si que puedes validar que expeditionStateType no sea null Tampoco entiendo pq lo has querido hacer con promesas, hazlo con await i al estar usando la misma transaccion te las va a tirar a atras. Incluso si se quiere se puede hacer que cada iteracion del bucle tenga su propia transaccion y solo te deshaga la que ha fallado y te matenga las otras
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-08-24 10:47:23 +00:00
gitea/salix/pipeline/head This commit looks good Details
386de69bce
refs #5216 fix error handling
jorgep requested review from alexm 2023-08-24 10:47:45 +00:00
alexm refused to review 2023-08-25 12:30:09 +00:00
alexm approved these changes 2023-08-25 12:30:58 +00:00
Dismissed
alexm requested changes 2023-08-25 12:33:21 +00:00
@ -0,0 +40,4 @@
{
fields: ['id'],
where: {code: expedition.stateCode}
}
Member

Falta usar la transaccion

Falta usar la transaccion
jorgep marked this conversation as resolved
@ -0,0 +51,4 @@
await models.ExpeditionState.create({
expeditionFk: expedition.expeditionFk,
typeFk,
});
Member

Falta usar la transaccion

Falta usar la transaccion
jorgep marked this conversation as resolved
jorgep added 2 commits 2023-08-25 12:37:51 +00:00
jorgep dismissed alexm’s review 2023-08-25 12:37:52 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep requested review from alexm 2023-08-25 12:38:12 +00:00
alexm approved these changes 2023-08-25 12:40:08 +00:00
jorgep added 1 commit 2023-08-25 12:43:34 +00:00
gitea/salix/pipeline/head This commit looks good Details
5fe12d9281
Merge branch 'dev' into 5216-expeditionStateAdd
jorgep added 1 commit 2023-08-25 12:57:00 +00:00
gitea/salix/pipeline/head This commit looks good Details
7f1db050ad
Merge branch 'dev' into 5216-expeditionStateAdd
jorgep merged commit d424714956 into dev 2023-08-25 13:06:31 +00:00
jorgep deleted branch 5216-expeditionStateAdd 2023-08-25 13:06:31 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1717
No description provided.