def resource_post_create_actions(resource, user, metadata, **kwargs): # receivers need to change the values of this dict if file validation fails file_validation_dict = {'are_files_valid': True, 'message': 'Files are valid'} # Send post-create resource signal post_create_resource.send(sender=type(resource), resource=resource, user=user, metadata=metadata, validate_files=file_validation_dict, **kwargs) check_file_dict_for_error(file_validation_dict)
def resource_post_create_actions(resource, user, metadata, **kwargs): # receivers need to change the values of this dict if file validation fails file_validation_dict = { 'are_files_valid': True, 'message': 'Files are valid' } # Send post-create resource signal post_create_resource.send(sender=type(resource), resource=resource, user=user, metadata=metadata, validate_files=file_validation_dict, **kwargs) check_file_dict_for_error(file_validation_dict)