Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Mar 8, 2024
1 parent 7759d64 commit 7e52677
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lemarche/www/tenders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ def get_or_create_user(request_user, tender_dict: dict, source=user_constants.SO


def duplicate(tender: Tender, fields_to_remove=FIELDS_TO_REMOVE) -> Tender:
fields_to_remove_full = ["_state", "_django_version", "id", "slug"] + fields_to_remove
fields_to_keep = [field for field in tender.__dict__.keys() if field not in fields_to_remove_full]
fields_to_remove_full = ["id", "slug"] + fields_to_remove
# other rule: fields starting with "_" : "_state", "_django_version", "__previous_siae_transactioned",
fields_to_keep = [
field_name
for field_name in tender.__dict__.keys()
if (field_name not in fields_to_remove_full and not field_name.startswith("_"))
]
# sectors # managed post-create

new_tender_dict = dict()
Expand Down

0 comments on commit 7e52677

Please sign in to comment.