Changeset 1557 in products


Ignore:
Timestamp:
Jan 15, 2010 5:12:52 AM (11 years ago)
Author:
mylan
Message:

Force making object with IMobile inteface only if it not yet provided

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.mobileextender/trunk/quintagroup/mobileextender/handlers.py

    r777 r1557  
    1 from zope.interface import alsoProvides 
     1from zope.interface import alsoProvides, providedBy 
    22from interfaces import IMobile 
    33 
     
    55    mobfield = object.Schema().get('mobile_content',None) 
    66    if mobfield and mobfield.get(object): 
    7         alsoProvides(object, IMobile) 
    8         object.reindexObject(idxs=['object_provides']) 
     7        if not IMobile in providedBy(object): 
     8            alsoProvides(object, IMobile) 
     9            object.reindexObject(idxs=['object_provides']) 
Note: See TracChangeset for help on using the changeset viewer.