Changeset 4605 for exist


Ignore:
Timestamp:
11/12/08 16:40:31 (11 years ago)
Author:
cbyrom
Message:

Implement text help for the remaining atom edit sections. Improve
handling of authors data - to cope with empty author data.
Move helper template functions to the utils template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/models/Atom.py

    r4601 r4605  
    251251        self.atomName = None 
    252252        self.files = [] 
    253         self.author = None 
     253        self.author = Person() 
    254254        self.contributors = [] 
    255255        self.atomAuthors = [] 
     
    972972            # NB, ensure there is only one author tag - extra authors are contributors 
    973973            authorType = Person.AUTHOR_TYPE 
    974             if self.author: 
     974            if self.author and self.author.hasValue(): 
    975975                authorType= Person.CONTRIBUTOR_TYPE 
    976976            obj = Person(personType = authorType) 
     
    983983            obj.fromString(objectVals) 
    984984            # NB, need to set it now, just in case we don't set it before coming back 
    985             if attributeName == "authors" and not self.author: 
     985            if attributeName == "authors" and (not self.author or not self.author.hasValue()): 
    986986                self.author = obj 
    987987            return obj 
Note: See TracChangeset for help on using the changeset viewer.