Open werberger opened 1 year ago
Hi, I am a first time contributor! Would this be a good first issue that I can assist with?
@werberger may want to claim this issue.
yeah. thanks @brylie and sorry @ilaiyengar - if it's any consolation it will also be my first contribution.
Hello, @brylie. Kindly assign me this
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 Truelast_name = models.CharField(max_length=63, blank=**False**)
change to TrueOr if "Anonymous" is the desired default (as I've seen mentioned), a possibly a partial solution would be to add
default="Anonymous"
for _firstname and change blank to True as above. However, this would still mean that _firstname would be required, of course.