Changing hosted_file_link field names.
This commit is contained in:
@@ -69,17 +69,17 @@ class Hosted_File_Link_Base(BaseModel):
|
||||
return redis_lookup_id_random(record_id_random=values['account_id_random'], table_name='account')
|
||||
return None
|
||||
|
||||
@validator('object_id', always=True)
|
||||
def object_id_lookup(cls, v, values, **kwargs):
|
||||
@validator('link_to_id', always=True)
|
||||
def link_to_id_lookup(cls, v, values, **kwargs):
|
||||
log.setLevel(logging.WARNING)
|
||||
log.debug(locals())
|
||||
|
||||
if values['object_id_random'] and values['object_type']:
|
||||
return redis_lookup_id_random(record_id_random=values['object_id_random'], table_name=values['object_type'])
|
||||
if values['link_to_id_random'] and values['link_to_type']:
|
||||
return redis_lookup_id_random(record_id_random=values['link_to_id_random'], table_name=values['link_to_type'])
|
||||
return None
|
||||
|
||||
class Config:
|
||||
underscore_attrs_are_private = True
|
||||
fields = base_fields
|
||||
|
||||
Hosted_File_Base.update_forward_refs()
|
||||
Hosted_File_Link_Base.update_forward_refs()
|
||||
|
||||
Reference in New Issue
Block a user