-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/duplicating testimonia #456
Conversation
This is currently disabled but will be enabled in a later PR which addresses this functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for missing duplicates section on Testimonium detail page. Also delete button seems not to work, but I guess that's a different PR.
src/rard/research/migrations/0071_add_duplicates_field_squashed.py
Outdated
Show resolved
Hide resolved
else: | ||
# otherwise delete it from the anonfrag being converted | ||
source.duplicate_afs.remove(d) | ||
def transfer_duplicates(source, destination): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in recent commit to ensure destination is added as duplicate of the source's duplicate as well as the reverse relationship being created.
blank=True, | ||
related_name="%(class)s_duplicate_ts", | ||
) | ||
|
||
@property | ||
def duplicates_list(self): | ||
duplicates = list(self.duplicate_frags.all()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've simplified this in the latest commit: as long as we make sure duplicate relationships are always bi-directional, we shouldn't have to look at the reverse relationships.
think it's in #442 (re button) |
closes #450