2

I have a Plone project which I need to fork; sadly, the UID of the temp folder (for Archetypes objects) is used in the code (as a module level variable, at least, not as strings all over the source tree).

When starting with a fresh ZODB - can I create the temp folder and set the UID? Or should I simply change that constant in the new development branch?

Tobias
  • 2,481
  • 3
  • 26
  • 38

1 Answers1

4

You can set the uid for an AT object by...

obj._setUID(uid)

The _setUID method is defined in Products.Archetypes.Referencable Module

For more information you can also check the plone.app.transmogrifier uidupdater section.

Mathias
  • 6,777
  • 2
  • 20
  • 32