Skip to content

Commit

Permalink
Merge pull request #3958 from mikhailprivalov/fixrecieveTubeGenerator…
Browse files Browse the repository at this point in the history
…Number

fix
  • Loading branch information
Wellheor1 authored Jun 19, 2024
2 parents 2df1fb3 + 6de8039 commit b01a340
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/directions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3587,7 +3587,9 @@ def tubes_for_get(request):
if vrpk not in has_rels:
with transaction.atomic():
try:
if direction.external_executor_hospital:
if direction.hospital:
hospital_for_generator_tube = direction.hospital
elif direction.external_executor_hospital:
hospital_for_generator_tube = direction.external_executor_hospital
else:
hospital_for_generator_tube = request.user.doctorprofile.get_hospital()
Expand All @@ -3600,6 +3602,7 @@ def tubes_for_get(request):
return status_response(False, str(e))
ntube = TubesRegistration(type=rel, number=number, chunk_number=chunk_number)
ntube.save()

has_rels[vrpk] = ntube
new_tubes.append(ntube)
else:
Expand Down

0 comments on commit b01a340

Please sign in to comment.