|
|
@@ -11,7 +11,6 @@ from shortuuidfield import ShortUUIDField
|
11
|
11
|
from TimeConvert import TimeConvert as tc
|
12
|
12
|
|
13
|
13
|
from coupon.models import CouponInfo
|
14
|
|
-from account.models import LensmanInfo
|
15
|
14
|
from kodo.basemodels import BrandInfoMixin
|
16
|
15
|
from mch.models import ModelInfo
|
17
|
16
|
from simditor.fields import RichTextField
|
|
|
@@ -996,14 +995,16 @@ class MemberActivityContributionInfo(BaseModelMixin, BrandInfoMixin):
|
996
|
995
|
|
997
|
996
|
@property
|
998
|
997
|
def admindata(self):
|
|
998
|
+ from account.models import LensmanInfo
|
|
999
|
+
|
999
|
1000
|
unlock_welfares = MemberActivityContributionWelfareUnlockingInfo.objects.filter(activity_id=self.activity_id, user_id=self.user_id)
|
1000
|
1001
|
unlock_welfares = [unlock_welfare.data for unlock_welfare in unlock_welfares]
|
1001
|
1002
|
|
1002
|
|
- # try:
|
1003
|
|
- # lensman = LensmanInfo.objects.get(user_id=self.user_id, lensman_status=LensmanInfo.ACTIVATED)
|
1004
|
|
- # lensman_name = lensman.name
|
1005
|
|
- # except LensmanInfo.DoesNotExist:
|
1006
|
|
- # lensman_name = ''
|
|
1003
|
+ try:
|
|
1004
|
+ lensman = LensmanInfo.objects.get(user_id=self.user_id, lensman_status=LensmanInfo.ACTIVATED)
|
|
1005
|
+ lensman_name = lensman.name
|
|
1006
|
+ except LensmanInfo.DoesNotExist:
|
|
1007
|
+ lensman_name = ''
|
1007
|
1008
|
|
1008
|
1009
|
return {
|
1009
|
1010
|
'contribution_id': self.contribution_id,
|
|
|
@@ -1015,7 +1016,7 @@ class MemberActivityContributionInfo(BaseModelMixin, BrandInfoMixin):
|
1015
|
1016
|
'content_type': self.content_type,
|
1016
|
1017
|
'title': self.title,
|
1017
|
1018
|
'content': self.content,
|
1018
|
|
- 'user_name': self.user_name,
|
|
1019
|
+ 'user_name': lensman_name if lensman_name else self.user_name,
|
1019
|
1020
|
'user_avatar': self.final_user_avatar,
|
1020
|
1021
|
'images': self.final_images,
|
1021
|
1022
|
'video_url': self.video_url or '',
|