Commit f73d4c329f136470ab32ea92027b3db257dc7dcd
1 parent
8f54c7956d
Exists in
master
Allow null mask on flashcard
Showing 2 changed files with 20 additions and 1 deletions Side-by-side Diff
flashcards/migrations/0004_auto_20150506_1443.py
View file @
f73d4c3
1 | +# -*- coding: utf-8 -*- | |
2 | +from __future__ import unicode_literals | |
3 | + | |
4 | +from django.db import models, migrations | |
5 | + | |
6 | + | |
7 | +class Migration(migrations.Migration): | |
8 | + | |
9 | + dependencies = [ | |
10 | + ('flashcards', '0003_auto_20150504_1600'), | |
11 | + ] | |
12 | + | |
13 | + operations = [ | |
14 | + migrations.AlterField( | |
15 | + model_name='userflashcard', | |
16 | + name='mask', | |
17 | + field=models.ForeignKey(blank=True, to='flashcards.FlashcardMask', help_text=b"A mask which overrides the card's mask", null=True), | |
18 | + ), | |
19 | + ] |
flashcards/models.py
View file @
f73d4c3
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | 3. A user has a flashcard hidden from them |
54 | 54 | """ |
55 | 55 | user = ForeignKey('User') |
56 | - mask = ForeignKey('FlashcardMask', help_text="A mask which overrides the card's mask") | |
56 | + mask = ForeignKey('FlashcardMask', blank=True, null=True, help_text="A mask which overrides the card's mask") | |
57 | 57 | pulled = DateTimeField(blank=True, null=True, help_text="When the user pulled the card") |
58 | 58 | flashcard = ForeignKey('Flashcard') |
59 | 59 | unpulled = DateTimeField(blank=True, null=True, help_text="When the user unpulled this card") |