src/ckanext-Metadata/ckanext/Metadata/plugin.py
def after_show(self, context, pkg_dict):
        '''
            Extensions will receive the validated data dict after the package
            is ready for display (Note that the read method will return a
            package domain object, which may not include all fields).
        '''
        # We are cheating the system here by putting dummy data for the resources
        # so that we can create dataset without resources. Then in our own local pkg_update()
        # we are deleting this dummy data
        if pkg_dict['state'] == 'draft' or pkg_dict['state'] == 'draft-complete':
            if len(pkg_dict['resources']) == 0:
                pkg_dict['resources'] = [{'dummy_resource': '****'}]

            Extensions will receive the validated data dict after the package
            is ready for display (Note that the read method will return a
            package domain object, which may not include all fields).
        
Extensions will receive the validated data dict after the package
is ready for display (Note that the read method will return a
package domain object, which may not include all fields).
Extensions will receive the validated data dict after the package is ready for display ( Note that the read method will return a package domain object which may not include all fields ) .
def after_show(self, context, pkg_dict):
        if pkg_dict['state'] == 'draft' or pkg_dict['state'] == 'draft-complete':
            if len(pkg_dict['resources']) == 0:
                pkg_dict['resources'] = [{'dummy_resource': '****'}]
def after_show ( self , context , pkg_dict ) : if pkg_dict [ 'state' ] == 'draft' or pkg_dict [ 'state' ] == 'draft-complete' : if len ( pkg_dict [ 'resources' ] ) == 0 : pkg_dict [ 'resources' ] = [ { 'dummy_resource' : '****' } ]
Extensions will receive the validated data dict after the package
is ready for display (Note that the read method will return a
package domain object, which may not include all fields).
Extensions will receive the validated data dict after the package is ready for display ( Note that the read method will return a package domain object which may not include all fields ) .
'''
            Extensions will receive the validated data dict after the package
            is ready for display (Note that the read method will return a
            package domain object, which may not include all fields).
        ''' # We are cheating the system here by putting dummy data for the resources # so that we can create dataset without resources. Then in our own local pkg_update() # we are deleting this dummy data
self
context
pkg_dict