Login
Back to bricks list
Introduction Version

ResourceRField

RField, these fields must be used in resource attribute This field is useful to link a resource with another resource without duplicating them. When the resource is saved after a task, the field must contains a Resource and if yes, this resource will be linked with the generated resource. Next time this resource is instantiated, the linked resource will be provided in the ResourceRField.

//!\ WARNING: the linked resource MUST be a resource provided as input of the task that generate the resource marked with ResourceRField. Otherwise there will be an error before saving the generated resource because it can break the tracability of resources

Attributes

include_in_dict_view: boolsearchable: bool

Functions

__INIT__
               Only small amount of data can be mark as searchable, defaults to False
                  Support primitive value, Type of Callable function
                  If type or callable, it will be called without parameter to initialise the default value, defaults to None
                  Do not mark huge fields as include in dict view, defaults to False
DESERIALIZE
Parameters:
NameTypeDefault valueDescription
resource_model_idstr
Return type:
Resource
GET_DEFAULT_VALUE
Return type:
Any
SERIALIZE
Parameters:
NameTypeDefault valueDescription
r_field_valueResource
Return type:
str