Use a materialized Extension.latest_version field instead of a dynamic property #152
@ -409,7 +409,7 @@ class Extension(CreatedModifiedMixin, RatingMixin, TrackChangesMixin, models.Mod
|
||||
|
||||
@transaction.atomic
|
||||
def update_latest_version(self, skip_version=None):
|
||||
versions = self.versions.select_related('file').all().order_by('-date_created')
|
||||
versions = self.versions.select_related('file').order_by('-date_created')
|
||||
latest_version = None
|
||||
for version in versions:
|
||||
if skip_version and version == skip_version:
|
||||
|
Loading…
Reference in New Issue
Block a user