projects
/
qcg-portal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67b7ea5
)
fix required attributes
author
Maciej Tronowski
<mtro@man.poznan.pl>
Wed, 9 Sep 2015 14:11:56 +0000
(16:11 +0200)
committer
Dawid Jagieła
<lightnir@gmail.com>
Sat, 12 Sep 2015 10:15:24 +0000
(12:15 +0200)
qcg/fields.py
patch
|
blob
|
history
diff --git
a/qcg/fields.py
b/qcg/fields.py
index
ef5170a
..
a61560d
100644
(file)
--- a/
qcg/fields.py
+++ b/
qcg/fields.py
@@
-30,8
+30,8
@@
class TimeRangeField(forms.MultiValueField):
(DAYS, u"Dni"),
)
- value = forms.IntegerField(min_value=0)
- unit = forms.TypedChoiceField(choices=UNIT_CHOICES, coerce=int)
+ value = forms.IntegerField(min_value=0, required=False)
+ unit = forms.TypedChoiceField(choices=UNIT_CHOICES, coerce=int, required=False)
widget = TimeRangeWidget(widgets=(value.widget, unit.widget))