-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed faceted viewlet broken because sessions format changed from list to OrderedDict. #26
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
Changes from 2 commits
9419c98
02932dd
ee477e5
ad2a6d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -331,15 +331,20 @@ def get_session_annotation(portal=None): | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| return annotations["imio.esign"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def get_session_info(session_id, portal=None): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def get_session_info(session_id, portal=None, readonly=True): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| """Return a session info for a given numbering. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :param session_id: the session id to return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :param portal: portal if necessary to get the session annotation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| :param readonly: return a copy of stored data to avoid modifying it | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| annot = get_session_annotation(portal=portal) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| session = {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if session_id in annot['sessions']: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return annot['sessions'][session_id] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| session = annot['sessions'][session_id] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if readonly: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| session = deepcopy(session) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+334
to
+347
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid changing This introduces a default 💡 Suggested adjustment-def get_session_info(session_id, portal=None, readonly=True):
+def get_session_info(session_id, portal=None):
@@
- if session_id in annot['sessions']:
- session = annot['sessions'][session_id]
- if readonly:
- session = deepcopy(session)
+ if session_id in annot['sessions']:
+ session = annot['sessions'][session_id]
return sessionIf read-only behavior is needed for the viewlet, apply 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def remove_context_from_session(context_uids): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.