fix: comanda balcao repetindo

This commit is contained in:
2025-03-21 17:07:16 -03:00
parent 51a7743d47
commit 0c4101d0c4
3 changed files with 1 additions and 1 deletions

View File

@@ -11,10 +11,10 @@ from gestaoRaul.decorators import group_required
@group_required(groupName='Garçom')
def viewBalcao(request):
user = User.objects.get(id=request.user.id)
try:
comanda = Comanda.objects.get(name=f'{user.id} - BALCÃO - {user.first_name}')
except:
user = User.objects.get(id=request.user.id)
mesa = Mesa.objects.get(id=1)
comanda = Comanda(name=f'{user.id} - BALCÃO - {user.first_name}', mesa=mesa, user=user,status='CLOSED')
comanda.save()

Binary file not shown.