modifique crear_partidas
This commit is contained in:
@@ -90,7 +90,14 @@ def crear_partidas(organizacion_id):
|
||||
|
||||
for pedimento in pedimentos:
|
||||
|
||||
crear_partidas_por_pedimento(pedimento.id)
|
||||
if pedimento.numero_partidas > pedimento.partidas.count():
|
||||
for i in range(1, pedimento.numero_partidas + 1):
|
||||
from api.customs.models import Partida
|
||||
Partida.objects.get_or_create(
|
||||
pedimento=pedimento,
|
||||
numero_partida=i,
|
||||
organizacion_id=organizacion_id
|
||||
)
|
||||
|
||||
@shared_task
|
||||
def crear_partidas_por_pedimento(pedimento_id):
|
||||
|
||||
Reference in New Issue
Block a user