Skip to content

Commit

Permalink
remove unnecessary helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jun 20, 2024
1 parent 7e0f542 commit 342d98c
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions codeforlife/models/signals/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,3 @@ def update_fields_includes(update_fields: UpdateFields, includes: t.Set[str]):
A flag designating if the fields are included in the update-fields.
"""
return update_fields and includes.issubset(update_fields)


def assert_update_fields_includes(
update_fields: UpdateFields, includes: t.Set[str]
):
"""Assert the call to .save() includes the update-fields specified.
Args:
update_fields: The update-fields provided in the call to .save().
includes: The fields that should be included in the update-fields.
"""
missing_update_fields = includes.difference(update_fields or set())

assert not missing_update_fields, (
"Call to .save() did not include the following update-fields: "
f"{', '.join(missing_update_fields)}."
)

0 comments on commit 342d98c

Please sign in to comment.