Skip to content

Commit

Permalink
added home_facility field for user (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marmik2003 authored Jul 15, 2022
1 parent df5a768 commit 9730efd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions care/users/migrations/0044_user_home_facility.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 2.2.11 on 2022-07-10 08:20

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('facility', '0301_auto_20220709_2051'),
('users', '0043_auto_20220624_1119'),
]

operations = [
migrations.AddField(
model_name='user',
name='home_facility',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='facility.Facility'),
),
]
1 change: 1 addition & 0 deletions care/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class User(AbstractUser):
gender = models.IntegerField(choices=GENDER_CHOICES, blank=False)
age = models.IntegerField(validators=[MinValueValidator(1), MaxValueValidator(100)])
skills = models.ManyToManyField("Skill", through=UserSkill)
home_facility = models.ForeignKey("facility.Facility", on_delete=models.PROTECT, null=True, blank=True)
verified = models.BooleanField(default=False)
deleted = models.BooleanField(default=False)

Expand Down

0 comments on commit 9730efd

Please sign in to comment.