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

Bug/overdue allow dooraccess #391

Closed

Conversation

olmari
Copy link
Collaborator

@olmari olmari commented Oct 1, 2022

Fix "tilamaksu" overdue member to be allowed access door. Changes both POST and GET methods of door API call results:

POST calls, change is in "MonthlyOverdue" result

{"email":"[email protected]","first_name":"NotMember","last_name":"NotMonthly","nick":null,"phone":"+358001"}
Response code: 481

{"email":"[email protected]","first_name":"Member","last_name":"NotMonthly","nick":null,"phone":"+358002"}
Response code: 481

{"email":"[email protected]","first_name":"Member","last_name":"MonthlyOverdue","nick":null,"phone":"+358003"}
Response code: 200

{"email":"[email protected]","first_name":"Member","last_name":"Monthly","nick":null,"phone":"+358004"}
Response code: 200

{"email":"[email protected]","first_name":"Member","last_name":"MonthlySuspended","nick":null,"phone":"+358005"}
Response code: 481

GET method also includes MonthlyOverdue member:

[{"email":"[email protected]","first_name":"Member","last_name":"Monthly","nick":null,"phone":"+358004"},{"email":"[email protected]","first_name":"Member","last_name":"MonthlyOverdue","nick":null,"phone":"+358003"}]
Response code: 200

@olmari
Copy link
Collaborator Author

olmari commented Oct 1, 2022

Fixes #386

@olmari olmari requested a review from tswfi October 1, 2022 19:11
api/views.py Outdated Show resolved Hide resolved
olmari and others added 2 commits October 2, 2022 03:13
Co-authored-by: Tatu Wikman <[email protected]>
Add from django.db.models import Q
@olmari olmari requested a review from tswfi October 2, 2022 00:55
@olmari
Copy link
Collaborator Author

olmari commented Oct 3, 2022

Let's scratch this as-is and make better one with some specing and proper "overdue" and new "deactivate" states so things can be better configured and used properly.

@olmari olmari closed this Oct 3, 2022
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.

2 participants