Skip to content

Commit

Permalink
trust bonus on user profile (#7534)
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki authored Nov 5, 2020
1 parent 1f0e56b commit c28d1c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,20 @@ class Profile(SuperModel):
products_choose = ArrayField(models.CharField(max_length=200), blank=True, default=list)
contact_email = models.EmailField(max_length=255, blank=True)

@property
def trust_bonus(self):
# returns a percentage trust bonus, for this curent user.
# trust bonus compounds for every new verification added
tb = 1
if self.is_brightid_verified:
tb *= 1.25
if self.is_twitter_verified:
tb *= 1.05
if self.sms_verification:
tb *= 1.05
return tb


@property
def is_blocked(self):
if not self.user:
Expand Down

0 comments on commit c28d1c5

Please sign in to comment.