@@ -266,8 +266,8 @@ class ModelInfo(BaseModelMixin): |
||
| 266 | 266 |
@property |
| 267 | 267 |
def member_shot_data(self): |
| 268 | 268 |
return {
|
| 269 |
- 'shot_id': self.model_id, |
|
| 270 |
- 'shot_name': self.shot_member_name, |
|
| 269 |
+ 'shot_id': self.shot_type_id, |
|
| 270 |
+ 'shot_name': self.model_uni_name, |
|
| 271 | 271 |
'shot_image': self.image2_url, |
| 272 | 272 |
'integral': self.shot_member_integral, |
| 273 | 273 |
} |
@@ -348,15 +348,19 @@ class ShotTypeInfo(BaseModelMixin, BrandInfoMixin): |
||
| 348 | 348 |
|
| 349 | 349 |
@property |
| 350 | 350 |
def shots(self): |
| 351 |
- models = ModelInfo.objects.filter(shot_type_id=self.shot_type_id, status=True, is_show_shot=True).order_by('-pk')
|
|
| 351 |
+ models = ModelInfo.objects.filter(shot_type_id=self.shot_type_id, status=True).order_by('-pk')
|
|
| 352 |
+ |
|
| 352 | 353 |
return [model.member_shot_data for model in models] |
| 353 | 354 |
|
| 354 | 355 |
@property |
| 355 | 356 |
def data(self): |
| 357 |
+ key = 'model_uni_name' |
|
| 358 |
+ seen = set() |
|
| 359 |
+ shots = [item for item in self.shots if not (item[key] in seen or seen.add(item[key]))] |
|
| 356 | 360 |
return {
|
| 357 | 361 |
'type_id': self.shot_type_id, |
| 358 | 362 |
'type_name': self.shot_type_name, |
| 359 |
- 'shots': self.shots, |
|
| 363 |
+ 'shots': shots, |
|
| 360 | 364 |
} |
| 361 | 365 |
|
| 362 | 366 |
|