Skip to content

Commit

Permalink
Adding E-Commerce
Browse files Browse the repository at this point in the history
  • Loading branch information
ericosta-dev committed Aug 30, 2024
1 parent b8d3732 commit aafb2c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion connect/api/v1/organization/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def get_authorization(self, obj):
def get_show_chat_help(self, obj):
if obj.config.get("show_chat_help"):
return True
return obj.authorizations.order_by("created_at").first().user.number_people == 4
user = obj.authorizations.order_by("created_at").first().user
return user.number_people == 4 or user.company_segment in ['E-commerce', 'Comercio electrónico']


class OrganizationAuthorizationSerializer(serializers.ModelSerializer):
Expand Down
3 changes: 2 additions & 1 deletion connect/api/v2/organizations/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def publish_create_org_message(self, instance: Organization, user: User):
def get_show_chat_help(self, obj):
if obj.config.get("show_chat_help"):
return True
return obj.authorizations.order_by("created_at").first().user.number_people == 4
user = obj.authorizations.order_by("created_at").first().user
return user.number_people == 4 or user.company_segment in ['E-commerce', 'Comercio electrónico']


class PendingAuthorizationOrganizationSerializer(serializers.ModelSerializer):
Expand Down

0 comments on commit aafb2c8

Please sign in to comment.