Skip to content

Commit

Permalink
add missing model index changes (#2697)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Sep 9, 2024
1 parent 3e20d43 commit 6a99344
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions onadata/apps/logger/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ class Meta:
("view_project_data", "Can view submitted data"),
("add_project_entitylist", "Can add entitylist to project"),
)
indexes = [
models.Index(fields=["deleted_at"], name="idx_logger_project_deleted_at"),
]

def __str__(self):
return f"{self.organization}|{self.name}"
Expand Down
6 changes: 6 additions & 0 deletions onadata/apps/logger/models/xform.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,12 @@ class Meta:
("can_export_xform_data", _("Can export form data")),
("delete_submission", _("Can delete submissions from form")),
)
indexes = [
models.Index(
fields=["deleted_at"],
name="idx_logger_xform_deleted_at",
)
]

def file_name(self):
"""Returns the XML filename based on the ``self.id_string``."""
Expand Down

0 comments on commit 6a99344

Please sign in to comment.