本文整理汇总了Python中MaKaC.rb_room.RoomBase.update方法的典型用法代码示例。如果您正苦于以下问题:Python RoomBase.update方法的具体用法?Python RoomBase.update怎么用?Python RoomBase.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.rb_room.RoomBase
的用法示例。
在下文中一共展示了RoomBase.update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update
# 需要导入模块: from MaKaC.rb_room import RoomBase [as 别名]
# 或者: from MaKaC.rb_room.RoomBase import update [as 别名]
def update( self ):
""" Documentation in base class. """
RoomBase.update( self )
# Check Simba mailing list
listName = self.customAtts.get( 'Simba List' )
if listName:
from MaKaC.user import GroupHolder
groups = GroupHolder().match( { 'name': listName }, forceWithoutExtAuth = True )
if not groups:
groups = GroupHolder().match( { 'name': listName } )
if not groups:
self.customAtts['Simba List'] = 'Error: unknown mailing list'
self._p_changed = True
示例2: update
# 需要导入模块: from MaKaC.rb_room import RoomBase [as 别名]
# 或者: from MaKaC.rb_room.RoomBase import update [as 别名]
def update( self ):
""" Documentation in base class. """
RoomBase.update( self )
# Check Simba mailing list
listName = self.customAtts.get( 'Simba List' )
if listName:
from MaKaC.user import GroupHolder
groups = GroupHolder().match( { 'name': listName }, forceWithoutExtAuth = True )
if not groups:
groups = GroupHolder().match( { 'name': listName } )
if not groups:
self.customAtts['Simba List'] = 'Error: unknown mailing list'
# reindex - needed due to possible manager changes
# super slow, though...
Catalog.getIdx('user_room').unindex_obj(self.guid)
Catalog.getIdx('user_room').index_obj(self.guid)
self._p_changed = True