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

api: add missing transition conditions #36

Merged
merged 1 commit into from
Jul 23, 2018

Conversation

jma
Copy link
Contributor

@jma jma commented Jul 19, 2018

Signed-off-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch

@jma jma force-pushed the jma-#28-extend-conditions branch 3 times, most recently from 41fe491 to 8860880 Compare July 19, 2018 15:17
# 30 days by default
if not end_date:
end_date = datetime.strptime(start_date, '%Y-%m-%d') + timedelta(
days=30
Copy link
Member

@zzacharo zzacharo Jul 20, 2018

Choose a reason for hiding this comment

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

Is it worth to make the 30 days by default in a config variable for quick overridability?

end_date = start_date + timedelta(days=30)
return (start_date.strftime('%Y-%m-%d'), end_date.strftime('%Y-%m-%d'))
end_date = datetime.strptime(transaction_date, '%Y-%m-%d') + timedelta(
days=30
Copy link
Member

Choose a reason for hiding this comment

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

same here.

@jma jma force-pushed the jma-#28-extend-conditions branch from 8860880 to db1ded3 Compare July 23, 2018 06:32
* Implement checkin, request, validate_request circulation policies
  using states conditions. (closes inveniosoftware#28)

Signed-off-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
@jma jma force-pushed the jma-#28-extend-conditions branch from db1ded3 to 534d3fb Compare July 23, 2018 06:38
@zzacharo
Copy link
Member

@jma can you rebase with the latest master and push again? So we can merge it after? There are some changes to be done as states and transitions are moved to the config.py.

@jma jma merged commit 05b7400 into inveniosoftware:master Jul 23, 2018
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.

[TASK-US#23] extend conditions to all actions
2 participants