You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to let the UUID creation be pluggable and let the user use his own UUID generator based on their needs.
if hasattr(settings, 'LAYER_UUID_HANDLER') and settings.LAYER_UUID_HANDLER != '':
from geonode.layers.utils import get_uuid_handler
instance.uuid = get_uuid_handler()(instance).create_uuid()
And is enough to add this config in settings.py by specifying the object that is responsible to manage the new UUID
LAYER_UUID_HANDLER = "mymodule.myfile.MyObject"
More information related to the configuration are available in this PR
The UUID will change only if a new handler is defined, otherwise will continue using the old version of the UUID
As far as I can see, the #6711 should not impact your development, but I don't have enough context on it, because from the code of the utils.py looks like that the UUID is read from the XML file and not defined on run-time.
So, if you decide to override the way to save the UUID (since is a Charfield could be anything) if you upload the metadata you (user) should have enough context of what's going on.
This is just an observation, maybe @afabiani could help us more :)
The current generation of the
UUID
for theLayers
is based on those two lines:instance.uuid = str(uuid.uuid1())
in geonode/geonode/layers/models.pylayer_uuid = str(uuid.uuid1())
in geonode/geonode/upload/upload.pyWe want to let the UUID creation be pluggable and let the user use his own UUID generator based on their needs.
And is enough to add this config in
settings.py
by specifying the object that is responsible to manage the new UUIDMore information related to the configuration are available in this PR
Documentation PR at this link
The text was updated successfully, but these errors were encountered: