|
39 | 39 | from django.contrib.contenttypes.models import ContentType |
40 | 40 | from django.core.exceptions import ValidationError, FieldDoesNotExist |
41 | 41 |
|
42 | | - |
| 42 | +from geonode.assets.utils import create_asset_and_link_dict, rollback_asset_and_link, copy_assets_and_links, create_link |
43 | 43 | from geonode.base.models import ResourceBase, LinkedResource |
| 44 | +from geonode.documents.tasks import create_document_thumbnail |
| 45 | +from geonode.metadata.manager import metadata_manager |
44 | 46 | from geonode.thumbs.thumbnails import _generate_thumbnail_name |
45 | 47 | from geonode.thumbs.utils import ThumbnailAlgorithms |
46 | | -from geonode.documents.tasks import create_document_thumbnail |
47 | 48 | from geonode.security.permissions import PermSpecCompact, DATA_STYLABLE_RESOURCES_SUBTYPES |
48 | 49 | from geonode.security.utils import ( |
49 | 50 | perms_as_set, |
|
54 | 55 |
|
55 | 56 | from . import settings as rm_settings |
56 | 57 | from .utils import update_resource, resourcebase_post_save, is_remote_resource |
57 | | -from geonode.assets.utils import create_asset_and_link_dict, rollback_asset_and_link, copy_assets_and_links, create_link |
58 | 58 |
|
59 | 59 | from ..base import enumerations |
60 | 60 | from ..security.utils import AdvancedSecurityWorkflowManager |
@@ -360,6 +360,10 @@ def update( |
360 | 360 | vals=vals, |
361 | 361 | extra_metadata=extra_metadata, |
362 | 362 | ) |
| 363 | + |
| 364 | + if ji := custom.get("jsoninstance", None): |
| 365 | + metadata_manager.update_schema_instance_partial(_resource, ji, user=None) |
| 366 | + |
363 | 367 | _resource = self._concrete_resource_manager.update(uuid, instance=_resource, notify=notify) |
364 | 368 |
|
365 | 369 | # The following is only a demo proof of concept for a pluggable WF subsystem |
|
0 commit comments