phdgang / django-video

Automatically exported from code.google.com/p/django-video
0 stars 0 forks source link

AssertionError at /admin/video/thumbnail/add/ #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install and run django video
2. add a video
3. add a thumbnail

What is the expected output? What do you see instead?
successful addition of thumbnail is expected. Instead I see
http://dpaste.com/536652/

What version of the product are you using? On what operating system?
using the current svn checkout. Testing it on Ubuntu 10.10 with python + 
virtualenv + all the reuired packages. 

Please provide any additional information below.

Original issue reported on code.google.com by v.iy...@gmail.com on 28 Apr 2011 at 7:46

GoogleCodeExporter commented 9 years ago
fixed it 

http://djangosnippets.org/snippets/1060/ had a comment which kinda fixes it. 
not sure of how it affects the app in a complete way. it works for now 
def to_python(self, value):
    if (value is None) or isinstance(value, datetime.timedelta):
        return value
    if value == '':
        value = 0
    assert isinstance(value, int), (value, type(value))
    return datetime.timedelta(seconds=value)

Original comment by v.iy...@gmail.com on 29 Apr 2011 at 3:58

GoogleCodeExporter commented 9 years ago
patched version available here https://bitbucket.org/viyyer/django-video

Original comment by v.iy...@gmail.com on 2 May 2011 at 4:18