Skip to content

Commit dcae5fd

Browse files
committed
[GET-ARCHITYPE]: Prioritize element's parent/creator before master's active sentinel
1 parent 20492ed commit dcae5fd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

jaseci_core/jaseci/prim/obj_mixins.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ def get_architype(self):
2727
and self._h._machine.parent().j_type == "sentinel"
2828
else None
2929
)
30-
mast = self.get_master()
31-
if arch is None and mast.active_snt() is not None:
32-
arch = mast.active_snt().get_arch_for(self)
33-
elif arch is None and self.parent() and self.parent().j_type == "sentinel":
30+
31+
if arch is None and self.parent() and self.parent().j_type == "sentinel":
3432
arch = self.parent().get_arch_for(self)
33+
34+
if arch is None:
35+
mast = self.get_master()
36+
if mast.active_snt() is not None:
37+
arch = mast.active_snt().get_arch_for(self)
38+
3539
self.cache_arch(arch)
3640
return arch
3741

0 commit comments

Comments
 (0)