1
0
mirror of https://github.com/FreeOpcUa/opcua-asyncio synced 2025-10-29 17:07:18 +08:00

Update node.py

This commit is contained in:
Andreas Heine
2020-07-20 08:07:18 +02:00
committed by GitHub
parent 9dca61ef87
commit a2a2fc9800

View File

@@ -651,7 +651,7 @@ class Node:
rules = await self.get_references(ua.ObjectIds.HasModellingRule)
await self.server.delete_references(list(map(self._fill_delete_reference_item, rules)))
# add new modelling rule as requested
if mandatory is not None and not False:
if mandatory is not None and mandatory is not False:
rule = ua.ObjectIds.ModellingRule_Mandatory if mandatory else ua.ObjectIds.ModellingRule_Optional
await self.add_reference(rule, ua.ObjectIds.HasModellingRule, True, False)