Skip to content

Commit

Permalink
style(models/User.public_id): add help_text
Browse files Browse the repository at this point in the history
fix: code style

feat(User): added help_text to public_id field

fix(User): remove db_index which is implicit
  • Loading branch information
calummackervoy committed Jul 9, 2024
1 parent 4689fb1 commit 2ee28bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion itou/users/migrations/0008_fix_user_public_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ class Migration(migrations.Migration):
model_name="user",
name="public_id",
field=models.UUIDField(
default=uuid.uuid4, unique=True, verbose_name="identifiant public opaque, pour les API"
default=uuid.uuid4,
unique=True,
verbose_name="identifiant public",
help_text="identifiant opaque, pour les API et les URLs publiques",
),
),
]
3 changes: 2 additions & 1 deletion itou/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ class User(AbstractUser, AddressMixin):
last_checked_at = models.DateTimeField(verbose_name="date de dernière vérification", default=timezone.now)

public_id = models.UUIDField(
verbose_name="identifiant public opaque, pour les API",
verbose_name="identifiant public",
help_text="identifiant opaque, pour les API et les URLs publiques",
default=uuid.uuid4,
unique=True,
)
Expand Down

0 comments on commit 2ee28bb

Please sign in to comment.