mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
Add avatar_version to UserProfile.
avatar_version is used to keep track of the avatar version of the user and to update the cache, everytime the user updates their avatar.
This commit is contained in:
20
zerver/migrations/0050_userprofile_avatar_version.py
Normal file
20
zerver/migrations/0050_userprofile_avatar_version.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-01-23 17:44
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('zerver', '0049_userprofile_pm_content_in_desktop_notifications'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='userprofile',
|
||||
name='avatar_version',
|
||||
field=models.PositiveSmallIntegerField(default=1),
|
||||
),
|
||||
]
|
||||
@@ -546,6 +546,7 @@ class UserProfile(ModelReprMixin, AbstractBaseUser, PermissionsMixin):
|
||||
(AVATAR_FROM_USER, 'Uploaded by user'),
|
||||
)
|
||||
avatar_source = models.CharField(default=AVATAR_FROM_GRAVATAR, choices=AVATAR_SOURCES, max_length=1) # type: Text
|
||||
avatar_version = models.PositiveSmallIntegerField(default=1) # type: int
|
||||
|
||||
TUTORIAL_WAITING = u'W'
|
||||
TUTORIAL_STARTED = u'S'
|
||||
|
||||
Reference in New Issue
Block a user