Skip to content
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

Fix/ Venue: replace note readers #2038

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Fix/ Venue: replace note readers #2038

merged 1 commit into from
Mar 5, 2024

Conversation

celestemartinez
Copy link
Member

If the edit copies the readers from note.readers, replace this value in invitation_edit_process.py

@@ -108,6 +108,8 @@ def updated_content_readers(note, paper_inv):
for note in notes:
final_invitation_readers = list(dict.fromkeys([note.signatures[0] if 'signatures' in r else r for r in invitation_readers]))
edit_readers = list(dict.fromkeys([note.signatures[0] if 'signatures' in r else r for r in paper_invitation.edit.get('readers',[])]))
if '${2/note/readers}' in edit_readers:
edit_readers = final_invitation_readers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is not note.readers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the current note.readers instead of the invitation.note.readers, is there an issue with that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the readers of the note could change though, we do this in line 117. If they change, we set them to final_invitation_readers

if final_invitation_readers and note.readers != final_invitation_readers:
    updated_note.readers = final_invitation_readers
    updated_note.nonreaders = paper_invitation.edit['note'].get('nonreaders')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can final_invitation_readers be empty?

@melisabok melisabok merged commit 2cde7bc into master Mar 5, 2024
1 check passed
@melisabok melisabok deleted the fix/edit-readers branch March 5, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants