clean code comment

This commit is contained in:
Cayo Puigdefabregas 2024-10-16 14:19:09 +02:00
parent 090ecc275f
commit c422eaddeb
1 changed files with 0 additions and 21 deletions

View File

@ -129,27 +129,6 @@ class Evidence:
key="hidalgo1", key="hidalgo1",
).order_by("-created").values_list("uuid", flat=True).distinct() ).order_by("-created").values_list("uuid", flat=True).distinct()
# annotations = Annotation.objects.filter(
# owner=user.institution,
# type=Annotation.Type.SYSTEM
# )
# annotations = annotations.annotate(
# priority=models.Case(
# models.When(key="CUSTOM_ID", then=1),
# models.When(key="hidalgo1", then=2),
# default=3,
# output_field=models.IntegerField(),
# )
# )
# # sqlite not soport distinct('uuid')
# # filtered_uuids = annotations.order_by('uuid', 'priority', '-created').distinct(
# # 'uuid').values_list("uuid", flat=True)
# filtered_uuids = annotations.order_by('uuid', 'priority', '-created').distinct(
# ).values_list("uuid", flat=True)
# return set(filtered_uuids)
def set_components(self): def set_components(self):
snapshot = ParseSnapshot(self.doc).snapshot_json snapshot = ParseSnapshot(self.doc).snapshot_json
self.components = snapshot['components'] self.components = snapshot['components']