summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tabellio/pcfdb/sync.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py
index ad59705..864b28c 100644
--- a/tabellio/pcfdb/sync.py
+++ b/tabellio/pcfdb/sync.py
@@ -252,6 +252,8 @@ class SyncFromPcfDbView(BrowserView):
if com_id in self._commission_intids:
return self._commission_intids.get(com_id)
obj = self.get_commission(com_id)
+ if obj is None:
+ return None
try:
intid = self.intids.getId(obj)
except KeyError:
@@ -1087,7 +1089,9 @@ class SyncFromPcfDbView(BrowserView):
object.authors = []
try:
- object.commissions = [RelationValue(self.get_commission_intid(x)) for x in curcom or []]
+ commission_ids = [self.get_commission_intid(x) for x in (curcom or []) if x not in ('001291649,')]
+ commission_ids = [x for x in commission_ids if x]
+ object.commissions = [RelationValue(x) for x in commission_ids]
except AttributeError:
pass