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): ...@@ -103,6 +103,7 @@ def WebSection_setObject(self, id, ob, **kw):
ob.setReference(reference) ob.setReference(reference)
if expiration_date is not None: if expiration_date is not None:
ob.setExpirationDate(expiration_date) ob.setExpirationDate(expiration_date)
ob.publish()
return ob return ob
def WebSection_putFactory(self, name, typ, body): def WebSection_putFactory(self, name, typ, body):
...@@ -119,6 +120,5 @@ 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, document = portal.portal_contributions.newContent(data=body,
filename=name, filename=name,
discover_metadata=False) discover_metadata=False)
document.publish()
return document return document
64 65
\ No newline at end of file \ 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