Skip to content

Commit

Permalink
Merge pull request #16 from opengisch/allow_blank
Browse files Browse the repository at this point in the history
Allow blank in profile settings
  • Loading branch information
suricactus authored May 10, 2021
2 parents f0133f9 + 0639e1c commit 80f51ba
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 4 deletions.
48 changes: 48 additions & 0 deletions docker-app/qfieldcloud/core/migrations/0035_auto_20210510_0635.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Generated by Django 3.2.2 on 2021-05-10 06:35

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("core", "0034_auto_20210508_1030"),
]

operations = [
migrations.AlterField(
model_name="project",
name="name",
field=models.CharField(
help_text="Only letters, numbers, underscores, hyphens and dots are allowed.",
max_length=255,
validators=[
django.core.validators.RegexValidator(
"^[a-zA-Z0-9-_\\.]+$",
"Only letters, numbers, underscores, hyphens and dots are allowed.",
)
],
),
),
migrations.AlterField(
model_name="useraccount",
name="bio",
field=models.CharField(blank=True, default="", max_length=255),
),
migrations.AlterField(
model_name="useraccount",
name="location",
field=models.CharField(blank=True, default="", max_length=255),
),
migrations.AlterField(
model_name="useraccount",
name="twitter",
field=models.CharField(blank=True, default="", max_length=255),
),
migrations.AlterField(
model_name="useraccount",
name="workplace",
field=models.CharField(blank=True, default="", max_length=255),
),
]
8 changes: 4 additions & 4 deletions docker-app/qfieldcloud/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ class UserAccount(models.Model):
help_text="Whether the account has the option to create a GeoDB.",
)
synchronizations_per_months = models.PositiveIntegerField(default=30)
bio = models.CharField(max_length=255, default="")
workplace = models.CharField(max_length=255, default="")
location = models.CharField(max_length=255, default="")
twitter = models.CharField(max_length=255, default="")
bio = models.CharField(max_length=255, default="", blank=True)
workplace = models.CharField(max_length=255, default="", blank=True)
location = models.CharField(max_length=255, default="", blank=True)
twitter = models.CharField(max_length=255, default="", blank=True)
is_email_public = models.BooleanField(default=False)
avatar_uri = models.CharField(_("Profile Picture URI"), max_length=255, blank=True)

Expand Down

0 comments on commit 80f51ba

Please sign in to comment.