Commit 4aa8959b authored by Łukasz Nowak's avatar Łukasz Nowak

Publish document late, after reference is known.

parent 074a1a12
......@@ -103,6 +103,7 @@ def WebSection_setObject(self, id, ob, **kw):
ob.setReference(reference)
if expiration_date is not None:
ob.setExpirationDate(expiration_date)
ob.publish()
return ob
def WebSection_putFactory(self, name, typ, body):
......@@ -119,6 +120,5 @@ def WebSection_putFactory(self, name, typ, body):
document = portal.portal_contributions.newContent(data=body,
filename=name,
discover_metadata=False)
document.publish()
return document
64
\ No newline at end of file
65
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment