fixed similar_one for get only from your devices
This commit is contained in:
parent
af9fe2d6b6
commit
52bd6d5271
|
@ -577,7 +577,8 @@ class Component(Device):
|
||||||
"""
|
"""
|
||||||
assert self.hid is None, 'Don\'t use this method with a component that has HID'
|
assert self.hid is None, 'Don\'t use this method with a component that has HID'
|
||||||
component = self.__class__.query \
|
component = self.__class__.query \
|
||||||
.filter_by(parent=parent, hid=None, **self.physical_properties) \
|
.filter_by(parent=parent, hid=None, owner_id=self.owner_id,
|
||||||
|
**self.physical_properties) \
|
||||||
.filter(~Component.id.in_(blacklist)) \
|
.filter(~Component.id.in_(blacklist)) \
|
||||||
.first()
|
.first()
|
||||||
if not component:
|
if not component:
|
||||||
|
|
Reference in New Issue