Changeset 447 in main


Ignore:
Timestamp:
11/03/11 17:12:58 (8 years ago)
Author:
pcosquer
Message:

mail: fix "AttributeError?: 'User' object has no attribute 'owner'"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/mail.py

    r441 r447  
    5555                recipients.update(gr.reachable(u).items()) 
    5656    elif ROLE_OWNER: 
    57         recipients.add(obj.owner.id) 
     57        if hasattr(obj, "owner"): 
     58            recipients.add(obj.owner.id) 
     59        elif isinstance(obj, User): 
     60            recipients.add(obj.id) 
    5861    return recipients 
    5962 
Note: See TracChangeset for help on using the changeset viewer.