Skip to content

Commit

Permalink
[FIX] shopinvader_anonymous_partner: Remove return value in _promote_…
Browse files Browse the repository at this point in the history
…anonymous_partner

And always drop the cookie
  • Loading branch information
paradoxxxzero committed Oct 29, 2024
1 parent 16eea14 commit 67e7319
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions shopinvader_anonymous_partner/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def _promote_from_anonymous_partner(self, anonymous_partner: ResPartner):
This method can return False to prevent the anonymous partner cookie
from being deleted.
"""
return True

@api.model
def _promote_anonymous_partner(
Expand All @@ -126,7 +125,5 @@ def _promote_anonymous_partner(
This method calls the partner promotion and removes the anonymous partner cookie.
"""
anonymous_partner = self._get_anonymous_partner__cookie(cookies)
if partner._promote_from_anonymous_partner(
anonymous_partner,
):
self._delete_anonymous_partner__cookie(cookies, response)
partner._promote_from_anonymous_partner(anonymous_partner)
self._delete_anonymous_partner__cookie(cookies, response)

0 comments on commit 67e7319

Please sign in to comment.