-
-
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
Create table user status type 35 #427
Conversation
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.
Left some minor comments. I switched to your branch in my local peopledepot git area, and I ran
1. ./scripts/buildrun.sh
2. ./scripts/test.sh
without issue.
Other than the few comments, it looks good to me 👍 .
app/core/admin.py
Outdated
|
||
|
||
@admin.register(UserStatusType) | ||
class UserStatusType(admin.ModelAdmin): |
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.
The class name should end with "Admin" as shown in the docs here.
@@ -426,3 +426,11 @@ class SocMajor(AbstractBaseModel): | |||
|
|||
def __str__(self): | |||
return self.title | |||
|
|||
|
|||
class UserStatusType(AbstractBaseModel): |
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.
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.
Great work!
I just have a couple of small things.
app/core/tests/test_api.py
Outdated
@@ -11,6 +11,7 @@ | |||
|
|||
USER_PERMISSIONS_URL = reverse("user-permission-list") | |||
ME_URL = reverse("my_profile") | |||
USER_STATUS_TYPE_URL = reverse("user-status-type-list") |
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 should be USER_STATUS_TYPES_URL
since it's the url for the list, which contains multiple models.
I see there's many of these lines that got through the PR process with the singular names. Will have to make an issue to to correct those.
] | ||
for uuid, name, description in items: | ||
UserStatusType.objects.create(uuid=uuid, name=name, description=description) | ||
pass |
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.
The pass
is a no-op (no operation) and should be removed. I think it's from the template.
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.
I realize there's only 1 migration in the original PR and it's definitely the right thing to do to add new commits in response to PR change requests.
Now that there's 3 migrations, you should add another commit to merge them into one. Here's a guide that's meant to help in this case. It's still in an issue right now. Maybe you can add some feedback/suggestion comment to it if you try it.
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.
No other changes from me. Tested buildrun and test scripts with no issues as well. Good work.
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 looks great! Thank you for adding the user status type model!
a60e248
to
5033fb7
Compare
5033fb7
to
8225c29
Compare
I decided to squash the commits before merging because there's migrations that's replaced in later commits. Squashing them removes those intermediate files from history so that rolling forward from any past commit would work. |
Fixes #35
What changes did you make?
Why did you make the changes (we will use this info to test)?