Skip to content

Commit

Permalink
move initials from base to peronalfieldsmixin
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jul 10, 2023
1 parent 107cf9c commit 2476601
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions edc_consent/field_mixins/personal_fields_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@


class BaseFieldsMixin(models.Model):
initials = EncryptedCharField(
validators=[
RegexValidator(
regex=r"^[A-Z]{2,3}$",
message="Ensure initials consist of letters only in upper case, no spaces.",
)
],
null=True,
blank=False,
)

dob = models.DateField(verbose_name="Date of birth", null=True, blank=False)

is_dob_estimated = IsDateEstimatedField(
Expand Down Expand Up @@ -91,5 +80,16 @@ class PersonalFieldsMixin(CryptoMixin, BaseFieldsMixin, models.Model):
help_text="Use UPPERCASE letters only.",
)

initials = EncryptedCharField(
validators=[
RegexValidator(
regex=r"^[A-Z]{2,3}$",
message="Ensure initials consist of letters only in upper case, no spaces.",
)
],
null=True,
blank=False,
)

class Meta:
abstract = True

0 comments on commit 2476601

Please sign in to comment.