def user_avatar(self): result="/static/global/images/fruit-avatar/Fruit-1.png" try: action_user=User.objects.get(id=self.action_log.User) if action_user.extend_info: result=AccountService.get_avatar_url(action_user) except Exception as ex: SimpleLogger.exception(ex) return result
def commitor_avatar(self): result = "/static/global/images/fruit-avatar/Fruit-1.png" commitor = User.objects.get(id=self.fortesting.Commitor) if commitor.extend_info: result = AccountService.get_avatar_url(commitor) return result
def user_avatar(self): result = "/static/global/images/fruit-avatar/Fruit-1.png" if self.user.extend_info: result = AccountService.get_avatar_url(self.user) return result
def get_avatar(self, obj): return AccountService.get_avatar_url(obj)
def borrower_avatar(self): result = "/static/global/images/fruit-avatar/Fruit-1.png" if self.device.DeviceBorrower: borrower = UserService.get_user(self.device.DeviceBorrower) result = AccountService.get_avatar_url(borrower) return result
def avatar(self): self.avatar_url = AccountService.get_avatar_url(self.user)