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

Inconsistent Required status for First name and Last name fields in Profiles and Users classes in Admin Console #1465

Open
werberger opened this issue Nov 6, 2022 · 5 comments
Assignees
Labels
triage Issues that have not been categorized or prioritized

Comments

@werberger
Copy link

Description

In the Admin Console, you are not able to save a Profile with empty First name or Last name.

However, you are able to save a User with name fields empty.

What should have happened?

No response

What browser(s) are you seeing the problem on?

No response

Further details

If the desired outcome is that the Profile can be saved with empty name fields then I think an easy fix may be:

class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="profile")
first_name = models.CharField(max_length=63, blank=**False**) change to True
last_name = models.CharField(max_length=63, blank=**False**) change to True

Or if "Anonymous" is the desired default (as I've seen mentioned), a possibly a partial solution would be to add default="Anonymous" for first_name and change blank to True as above. However, this would still mean that first_name would be required, of course.

@werberger werberger added the triage Issues that have not been categorized or prioritized label Nov 6, 2022
@ilaiyengar
Copy link

Hi, I am a first time contributor! Would this be a good first issue that I can assist with?

@brylie
Copy link
Member

brylie commented Nov 8, 2022

@werberger may want to claim this issue.

@werberger
Copy link
Author

yeah. thanks @brylie and sorry @ilaiyengar - if it's any consolation it will also be my first contribution.

@Nehemiah60
Copy link
Contributor

Hello, @brylie. Kindly assign me this

@brylie brylie assigned Nehemiah60 and unassigned werberger Feb 27, 2023
@LuckyKhoza-crypto
Copy link

It's still open, please assign it to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues that have not been categorized or prioritized
Projects
None yet
Development

No branches or pull requests

5 participants