Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
i forgot 💀 fix lmao yeet
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerwoud committed Mar 11, 2024
1 parent cb7eac1 commit 6db6fad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/project/utils/query_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ def insert_into_model(model: DeclarativeMeta,
a message indicating that something went wrong while inserting into the database.
"""
try:
new_instance = create_model_instance(model, data, response_url_base, required_fields)
model_instance = new_instance[0]
status_code = new_instance[1]
model_instance, status_code = create_model_instance(model, data, response_url_base, required_fields)

# if its a tuple the model instance couldn't be created so it already
# is the right format of error message and we just need to return
if status_code == 400:
Expand Down

0 comments on commit 6db6fad

Please sign in to comment.