Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Models and signup & login views for consumer_user_poc #155
base: master
Are you sure you want to change the base?
Models and signup & login views for consumer_user_poc #155
Changes from 12 commits
70c3abd
24660a8
ca0ff9c
a2a4655
8f921e9
4eab216
9259888
2e55a11
bd1bc56
05ff960
71f200d
b6e3f86
3a48c03
5b161a9
4132c62
6a43641
1623156
33f8433
34b58ad
f8de41f
6c47746
aff9346
d90710e
08d3e08
fce58b3
143bb10
08fb9e1
8706645
e60c146
0e593cd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
this seems to be copied from https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/domain/decorators.py#L517-L526
Is there a reason you need a new decorator?
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.
Bump.
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.
Created a new decorator so that we could redirect to consumer_user login if the current user logged in user doesn't have corresponding ConsumerUser instance. ConsumerUserCaseRelationship has relation ship to ConsumerUser. Once he logins corresponding ConsumerUser will be created.
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.
What is this?
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.
Added this as a check to break out of the loop as update_case is triggering signal again. Made some changes to the logic for better readablity. Let me know If any other changes needs to be made.
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 you explain this part? I don't follow why we delete all the relationships here.
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.
We have a unique_together constraint on case_id, domain in ConsumerUserCaseRelationship Model. In case if there are any rows with same case_id and domain(previous invitation might have been accepted right) so we are deleting it. The change is still there. If my understanding is wrong, let me know I will delete that code