fix type checking: avoid error for objects not providing a type
This commit is contained in:
parent
94165f41bb
commit
9079d8e23e
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2014 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -59,8 +59,10 @@ class ChangeManager(BaseRecordManager):
|
||||||
return False
|
return False
|
||||||
opt = self.options('organize.tracking.changes')
|
opt = self.options('organize.tracking.changes')
|
||||||
if isinstance(opt, (list, tuple)):
|
if isinstance(opt, (list, tuple)):
|
||||||
|
if hasattr(self.context, 'getType'):
|
||||||
type = self.context.getType()
|
type = self.context.getType()
|
||||||
return type and getName(type) in opt
|
return type and getName(type) in opt
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
return bool(opt)
|
return bool(opt)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue