]> git.parisson.com Git - telemeta.git/commitdiff
Merge branch 'master' into crem
authoryomguy <yomguy@parisson.com>
Fri, 18 Nov 2011 12:16:22 +0000 (13:16 +0100)
committeryomguy <yomguy@parisson.com>
Fri, 18 Nov 2011 12:16:22 +0000 (13:16 +0100)
1  2 
telemeta/models/media.py

index 43730895c3996847ca33fbf8db2eb72d3da7c1b9,83b223ec330ad668442f88c158848af7739daec4..70a8a09bfeba808f15c589d93a8d74aac486f525
@@@ -217,10 -217,12 +217,12 @@@ class MediaCollection(MediaResource)
  class MediaCollectionForm(ModelForm):
      class Meta:
          model = MediaCollection
+     def clean_doctype_code(self):
+         return self.cleaned_data['doctype_code'] or 0
          
  
 -item_published_code_regex    = '[A-Za-z0-9._-]*'
 -item_unpublished_code_regex  = '[A-Za-z0-9._-]*'
 +item_published_code_regex    = collection_published_code_regex + '(?:_[0-9]{2,3}){1,2}'
 +item_unpublished_code_regex  = collection_unpublished_code_regex + '_[0-9]{2,3}(?:_[0-9]{2,3}){0,2}'
  item_code_regex              = '(?:%s|%s)' % (item_published_code_regex, item_unpublished_code_regex)
  
  class MediaItem(MediaResource):