Skip to content

Commit

Permalink
Fix du nom de l'entreprise d'un dépôt de besoin (#945)
Browse files Browse the repository at this point in the history
* Not pop the value of contact_company_name

* remove useless specific field
  • Loading branch information
madjid-asa authored Oct 25, 2023
1 parent 24104a7 commit effda9e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lemarche/api/tenders/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class TenderSerializer(serializers.ModelSerializer):
location = serializers.SlugRelatedField(
queryset=Perimeter.objects.all(), slug_field="slug", allow_null=True, required=False
)
contact_company_name = serializers.CharField(required=False)
extra_data = serializers.JSONField(required=False)

class Meta:
Expand Down
2 changes: 1 addition & 1 deletion lemarche/www/tenders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_or_create_user_from_anonymous_content(tender_dict: dict, source: str = U
"first_name": tender_dict.get("contact_first_name"),
"last_name": tender_dict.get("contact_last_name"),
"phone": tender_dict.get("contact_phone"),
"company_name": tender_dict.pop("contact_company_name")
"company_name": tender_dict.get("contact_company_name")
if tender_dict.get("contact_company_name")
else "Particulier",
"kind": User.KIND_BUYER, # not necessarily true, could be a PARTNER
Expand Down

0 comments on commit effda9e

Please sign in to comment.