42524e361030b61e5b004f70c9371a3442257753,app/grandchallenge/reader_studies/models.py,Answer,save,#Answer#,246
Before Change
if adding:
// Allow the editors and creator to view this answer
assign_perm(
f"view_{self._meta.model_name}",
self.question.reader_study.editors_group,
self,
)
assign_perm(f"view_{self._meta.model_name}", self.creator, self)
// TODO: ordering, unique together
After Change
super().save(*args, **kwargs)
if adding:
self.assign_permissions()
def assign_permissions(self):
// Allow the editors and creator to view this answer
assign_perm(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: comic/grand-challenge.org
Commit Name: 42524e361030b61e5b004f70c9371a3442257753
Time: 2019-07-25
Author: code@jmsmkn.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: Answer
Method Name: save
Project Name: comic/grand-challenge.org
Commit Name: 42524e361030b61e5b004f70c9371a3442257753
Time: 2019-07-25
Author: code@jmsmkn.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: Question
Method Name: save
Project Name: comic/grand-challenge.org
Commit Name: 42524e361030b61e5b004f70c9371a3442257753
Time: 2019-07-25
Author: code@jmsmkn.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: ReaderStudy
Method Name: save
Project Name: comic/grand-challenge.org
Commit Name: 42524e361030b61e5b004f70c9371a3442257753
Time: 2019-07-25
Author: code@jmsmkn.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: Answer
Method Name: save