Change to use has_watermark

Brightcells 7 years ago
parent
commit
7a28857d24
1 changed files with 1 additions and 2 deletions
  1. 1 2
      group/models.py

+ 1 - 2
group/models.py

@@ -263,8 +263,7 @@ class GroupPhotoInfo(CreateUpdateMixin):
263 263
 
264 264
     @property
265 265
     def photo_url(self):
266
-        bucket = 'watermark' if PhotosInfo.objects.filter(p_photo_path=self.photo_path).exists() else 'photo'
267
-        return qiniu_file_url(self.photo_path, bucket=bucket)
266
+        return qiniu_file_url(self.photo_path, bucket='watermark' if self.has_watermark else 'photo')
268 267
 
269 268
     @property
270 269
     def photo_thumbnail_url(self):