From 498093321b81b923a98c5a8115530484a28d654e Mon Sep 17 00:00:00 2001 From: Abhijit Mahabal Date: Sun, 12 Mar 2017 11:22:52 -0700 Subject: [PATCH] Fix test failure; don't assume History is on. --- farg/apps/pyseqsee/relation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/farg/apps/pyseqsee/relation.py b/farg/apps/pyseqsee/relation.py index 2a0ab2b..36f40df 100644 --- a/farg/apps/pyseqsee/relation.py +++ b/farg/apps/pyseqsee/relation.py @@ -8,9 +8,10 @@ def __init__(self, *, first, second, parents=[]): self.first = first self.second = second Categorizable.__init__(self) - roles = {first._hid: "first end", second._hid: "second end"} - History.AddArtefact(self, ObjectType.WS_RELN, "", parents, roles) - History.Note("Created relation") + if History._is_history_on: + roles = {first._hid: "first end", second._hid: "second end"} + History.AddArtefact(self, ObjectType.WS_RELN, "", parents, roles) + History.Note("Created relation") def FindCategories(self, *, end_category): new_cats = []