def _deserialize_dependencies(artifact_type, deps_from_db, artifact_properties, plugins):
 for (dep_name, dep_value) in six.iteritems(deps_from_db):
  if (not dep_value):
   continue
  if isinstance(artifact_type.metadata.attributes.dependencies.get(dep_name), declarative.ListAttributeDefinition):
   val = []
   for v in dep_value:
    val.append(deserialize_from_db(v, plugins))
  elif (len(dep_value) == 1):
   val = deserialize_from_db(dep_value[0], plugins)
  else:
   raise exception.InvalidArtifactPropertyValue(message=_('Relation %(name)s may not have multiple values'), name=dep_name)
  artifact_properties[dep_name] = val

def _deserialize_dependencies ( artifact_type , deps_from_db , artifact_properties , plugins ) : for ( dep_name , dep_value ) in six . iteritems ( deps_from_db ) : if ( not dep_value ) : continue if isinstance ( artifact_type . metadata . attributes . dependencies . get ( dep_name ) , declarative . ListAttributeDefinition ) : val = [ ] for v in dep_value : val . append ( deserialize_from_db ( v , plugins ) ) elif ( len ( dep_value ) == 1 ) : val = deserialize_from_db ( dep_value [ 0 ] , plugins ) else : raise exception . InvalidArtifactPropertyValue ( message = _ ( 'Relation %(name)s may not have multiple values' ) , name = dep_name ) artifact_properties [ dep_name ] = val
retrieves dependencies from database .