Skip to content

Commit

Permalink
SCKAN-273 - do a get instead of filter first - since reference_uri is…
Browse files Browse the repository at this point in the history
… unique
  • Loading branch information
D-GopalKrishna committed Nov 12, 2024
1 parent 0b50d12 commit 92d9f82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create_or_update_connectivity_statement(statement: Dict, sentence: Sentence,
if has_changes(connectivity_statement, statement, defaults):
defaults_without_state = {field: value for field, value in defaults.items() if field != 'state'}
ConnectivityStatement.objects.filter(reference_uri=reference_uri).update(**defaults_without_state)
connectivity_statement = ConnectivityStatement.objects.filter(reference_uri=reference_uri).first()
connectivity_statement = ConnectivityStatement.objects.get(reference_uri=reference_uri)
add_ingestion_system_note(connectivity_statement)

validation_errors = statement.get(VALIDATION_ERRORS, ValidationErrors())
Expand Down

0 comments on commit 92d9f82

Please sign in to comment.