Skip to content

Commit

Permalink
Delete nickname
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamín Mravec committed Nov 10, 2023
1 parent a773716 commit 57a27c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion base/management/commands/load_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def _load_users(self, conn, school_id_map):
first_name=user['first_name'],
last_name=user['last_name'],
user=new_user,
nickname=user['username'],
school=school_id_map.get(
user['school_id'], School.objects.get_unspecified_value()),
year_of_graduation=grade,
Expand Down
3 changes: 0 additions & 3 deletions user/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ def update(self, instance, validated_data):

# Update Profile
# Nie všetky polia v modeloch User a Profile sú editovateľné cez API.
instance.profile.nickname = profile_data.get(
'nickname', instance.profile.nickname)
instance.profile.phone = profile_data.get(
'phone', instance.profile.phone)
instance.profile.parent_phone = profile_data.get(
Expand Down Expand Up @@ -186,7 +184,6 @@ def save(self, request):
Profile.objects.create(user=user,
first_name=profile_data['first_name'],
last_name=profile_data['last_name'],
nickname=profile_data['nickname'],
school=profile_data['school'],
year_of_graduation=grade.get_year_of_graduation_by_date(),
phone=profile_data['phone'],
Expand Down

0 comments on commit 57a27c7

Please sign in to comment.