Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleysommer committed Aug 27, 2024
2 parents c4b83c2 + 6882f5f commit d3039a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rdflib/plugins/serializers/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def write_triples(contexts, op_code, use_passed_contexts=False):

if operation:
assert operation in add_remove_methods, f"Invalid operation: {operation}"

elif not target:
# No operation specified and no target specified
# Fall back to default operation of "add" to prevent a no-op
operation = "add"
write_header()
if operation:
operation_code = add_remove_methods.get(operation)
Expand Down

0 comments on commit d3039a6

Please sign in to comment.