-
Notifications
You must be signed in to change notification settings - Fork 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
Circulation: invenio-circulation integration #146
Conversation
591831f
to
c0def98
Compare
e7ba5ba
to
43a5150
Compare
3ae52bc
to
a80b55e
Compare
6d2e591
to
21b6bbf
Compare
'term', | ||
**{"patron_type_pid": self.pid} | ||
).source().scan())) | ||
|
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.
can be rewritten as:
return PatronsSearch().filter('term', **{'patron_type_pid': self.pid}).count() == 0
'term', | ||
**{"organisation_pid": organisation_pid} | ||
).source().scan() | ||
patron_type = ( |
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.
can be rewritten as:
return next(PatronTypeSearch()
.filter('term', **{'patron_type_name': name})
.filter('term', **{'organisation_pid': organisation_pid}).scan())
@@ -65,6 +65,16 @@ def i18n_to_str(language): | |||
def resolve_function(function_name): | |||
"""Execute resolve function.""" | |||
result = [] | |||
if function_name == 'libraries_pids_names': | |||
from rero_ils.modules.libraries_locations.api import Library |
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.
import at the top
@@ -65,6 +65,16 @@ def i18n_to_str(language): | |||
def resolve_function(function_name): | |||
"""Execute resolve function.""" | |||
result = [] | |||
if function_name == 'libraries_pids_names': | |||
from rero_ils.modules.libraries_locations.api import Library | |||
for id in Library.get_all_ids(): |
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.
please use _id
instead of id
as it is a reserved word in python
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.
why not library_id
@@ -65,6 +65,16 @@ def i18n_to_str(language): | |||
def resolve_function(function_name): |
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.
bad name
NEW: circulation apis refactoring Co-Authored-by: Aly Badr [email protected] Co-Authored-by: Gianni Pante [email protected]
21b6bbf
to
1732ff1
Compare
NEW: circulation apis refactoring
Co-Authored-by: Aly Badr [email protected]
Co-Authored-by: Gianni Pante [email protected]
To Test:
application_test:
Go through all the functionalities you can on the localhost:5000 except the circulation_ui.