You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 first_name and change blank to True as above. However, this would still mean that first_name would be required, of course.The text was updated successfully, but these errors were encountered: