(value)
return deepcopy(value)
Use our lightweight class to avoid copying the instance on a FieldFile deepcopy.
Use our lightweight class to avoid copying the instance on a FieldFile deepcopy.
Use our lightweight class to avoid copying the instance on a FieldFile deepcopy .
def lightweight_deepcopy(value):
    """
    Use our lightweight class to avoid copying the instance on a FieldFile deepcopy.
    """
    if isinstance(value, FieldFile):
        value = LightStateFieldFile(
            instance=value.instance,
            field=value.field,
            name=value.name,
        )
    return deepcopy(value)
def lightweight_deepcopy ( value ) : if isinstance ( value , FieldFile ) : value = LightStateFieldFile ( instance = value . instance , field = value . field , name = value . name , ) return deepcopy ( value )