Fix warnings on startup + add more TODO #1
9
TODO
9
TODO
|
@ -14,8 +14,8 @@ Make the various windows centre themselves
|
|||
Document all functions
|
||||
Conform to python naming conventions and code style
|
||||
Make db_layer use a helper function to handle most of the database queries
|
||||
Unify the db_layer interface w.r.t. whether book_ids should be passed as
|
||||
strings or ints or dicts.
|
||||
Unify the db_layer interface w.r.t. whether book_ids should be passed as strings or ints or dicts.
|
||||
Deal with unicode in a proper manner.
|
||||
|
||||
|
||||
_Bugs_
|
||||
|
@ -27,16 +27,19 @@ When the top element shown is highlighted in the browser window, and pgUp is pre
|
|||
- does not happen when up_arrow is pressed.
|
||||
Error checking out an already checked out book
|
||||
- SQLite integrity check failure
|
||||
Multiple failed emails print to the terminal in a way that can't be readable.
|
||||
Database has various quirks and issues, the way queries are done is absolutely wild.
|
||||
|
||||
|
||||
|
||||
_Implemented Features_
|
||||
Categories work based on selection, not just highlight
|
||||
Sort by column in browser
|
||||
Support UTF-8 for everything
|
||||
*Support UTF-8 for everything*
|
||||
Search ignores Case (for lowercase search strings)
|
||||
Text entry supports longer string
|
||||
Home and End navigate to top and bottom of catalogue respectively.
|
||||
|
||||
Support for multiple copies
|
||||
- books will have their book_id written in pencil on inside cover
|
||||
|
||||
|
|
|
@ -40,13 +40,13 @@ class DaysForm(FormWindow):
|
|||
|
||||
def _return_values(self):
|
||||
ret = self.entries[0].value
|
||||
if ret is "":
|
||||
if ret == "":
|
||||
return DEFAULT_DAY_VALUE
|
||||
else:
|
||||
#If we didn't get valid input, noisily fail
|
||||
assert ret.isdigit() and int(ret) > 0, \
|
||||
"Max signed out days is not positive: " + ret.__repr__()
|
||||
return int(ret)
|
||||
|
||||
#If we didn't get valid input, noisily fail
|
||||
assert ret.isdigit() and int(ret) > 0, \
|
||||
"Max signed out days is not positive: " + ret.__repr__()
|
||||
return int(ret)
|
||||
|
||||
|
||||
class NameForm(FormWindow):
|
||||
|
@ -55,11 +55,11 @@ class NameForm(FormWindow):
|
|||
labels = ["Name"]
|
||||
|
||||
def _return_values(self):
|
||||
if self.entries[0].value is "":
|
||||
if self.entries[0].value == "":
|
||||
return "Librarian"
|
||||
else:
|
||||
assert self.entries[0].value.isprintable()
|
||||
return self.entries[0].value
|
||||
|
||||
assert self.entries[0].value.isprintable()
|
||||
return self.entries[0].value
|
||||
|
||||
|
||||
#Private functions
|
||||
|
@ -108,7 +108,8 @@ def _send_email(quest_id: str,
|
|||
#Public functions
|
||||
@permissions.check_permissions(permissions.PERMISSION_LIBCOM)
|
||||
@catch_error_with(lambda w, hb, *args: (w, hb, None))
|
||||
def sendemails_procedure(w, hb, cy, cx, mx):
|
||||
def sendemails_procedure(w, hb, cy, cx, mx):
|
||||
# TODO: This bugs out when multiple emails fail to be sent.
|
||||
"""Procedure to send emails to those with overdue books
|
||||
|
||||
w: ncurses window for the routine
|
||||
|
|
Loading…
Reference in New Issue