Bugfix: Typo
diff --git a/planetstack/apigen/modelgen b/planetstack/apigen/modelgen
index e75467e..c36048e 100755
--- a/planetstack/apigen/modelgen
+++ b/planetstack/apigen/modelgen
@@ -107,7 +107,7 @@
 					cobj = copy.deepcopy(obj)
 					cobj.multi = True
 					cobj.plural_name = related_name
-					refobj.refs.append(obj)
+					refobj.refs.append(cobj)