Skip to content

Commit

Permalink
update medical module
Browse files Browse the repository at this point in the history
  • Loading branch information
Idiono-mfon committed Nov 9, 2023
1 parent 6029601 commit 62ebee4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions medical/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ def check_unique_code_item(code):
def create_item_or_service(data, item_service_model):
item_service_uuid = data.pop('uuid') if 'uuid' in data else None
# update_or_create(uuid=service_uuid, ...)
# doesn't work because of explicit attempt to set null to uuid!

# data["audit_user_id"] = user.id_for_audit
data["audit_user_id"] = 1

# doesn't work because of explicit attempt to set null to uuid!
incoming_code = data.get('code')
item_service = item_service_model.objects.filter(uuid=item_service_uuid).first()
current_code = item_service.code if item_service else None
Expand Down Expand Up @@ -148,5 +144,4 @@ def __init__(self, user):

@register_service_signal('medication_service.create_or_update')
def create_or_update(self, data, model):

return create_item_or_service(data, model)

0 comments on commit 62ebee4

Please sign in to comment.