Changeset 6229b12


Ignore:
Timestamp:
Nov 30, 2011 11:24:43 AM (3 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, dev, dev2, diadems, dj1.6, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, security, server, social, storage, telecaster, test, video
Children:
33d177a
Parents:
eaaaaae
git-author:
yomguy <yomguy@…> (30/11/2011 11:24:43)
git-committer:
yomguy <yomguy@…> (30/11/2011 11:24:43)
Message:

fix computed duration with no .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • telemeta/models/media.py

    r9f44950 r6229b12  
    468468    def to_dict(self): 
    469469        if self.analyzer_id == 'duration': 
    470             value = self.value.split('.') 
    471             self.value = '.'.join([value[0], value[1][:2]]) 
     470            if '.' in value: 
     471                value = self.value.split('.') 
     472                self.value = '.'.join([value[0], value[1][:2]]) 
    472473        return {'id': self.analyzer_id, 'name': self.name, 'value': self.value, 'unit': self.unit} 
    473474         
Note: See TracChangeset for help on using the changeset viewer.