Add CID user support in collection history and reset answers functionality

This commit is contained in:
Ross
2025-10-13 11:28:07 +01:00
parent fa08f9cf76
commit 32d8430f94
8 changed files with 222 additions and 58 deletions
+7
View File
@@ -1254,6 +1254,13 @@ class CaseDetail(models.Model):
except UserReportAnswer.DoesNotExist:
return None
def get_cid_answers(self, cid):
"""Returns the cid users answers as a json string"""
try:
return CidReportAnswer.objects.get(question=self, cid=cid)
except CidReportAnswer.DoesNotExist:
return None
def default_viewerstate_string(self):
return json.dumps(self.default_viewerstate) if self.default_viewerstate else "{}"