-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Create check-in on reading log add #6987
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
Create check-in on reading log add #6987
Conversation
- Add minimal UI for POSTing new check-ins - UI only accessible to admins - UI is expected to be temporary. Its purpose is to demonstrate how check-in data is POSTed, and to provide a quick way to add dummy check- ins
- Change `json` endpoint - Change is_valid - Extend persistence class from `CommonExtras`
FINISH = 3 | ||
|
||
@classmethod | ||
def has_key(cls, key: str) -> bool: |
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.
Will this work? has_key()
is kinda passe.
def has_key(cls, key: str) -> bool: | |
def __contains__(cls, key: str) -> bool: |
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.
Thanks for this note! I tried this and was seeing TypeDef
errors when checking if an int was in BookshelfEvents
. I applied this review note and fixed the error in #7212
today = date.today() | ||
date_str = f'{today.year}-{today.month:02}-{today.day:02}' |
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.
today = date.today() | |
date_str = f'{today.year}-{today.month:02}-{today.day:02}' | |
date_str = f"{date.today():%Y-%m-%d}" |
if not BookshelfEvent.has_key(data['event_type']): | ||
return False | ||
return True |
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.
if not BookshelfEvent.has_key(data['event_type']): | |
return False | |
return True | |
return BookshelfEvent.has_key(data['event_type']) |
Closing this as we have decided that patrons should check in manually. |
Automatically creates a check-in event whenever a book is added to "Currently Reading" or "Already Read" reading logs.
Blocked by #6662 --- Once that is merged, this will need to be rebased.
Technical
Testing
Screenshot
Stakeholders