Updates the field of info about an OTU that might not be filled in by a match_names or taxon call.
433479
def update_empty_fields(self, **kwargs):
        """"""
        if self._is_deprecated is None:
            self._is_deprecated = kwargs.get('is_deprecated')
        if self._is_dubious is None:
            self._is_dubious = kwargs.get('is_dubious')
        if self._is_synonym is None:
            self._is_synonym = kwargs.get('is_synonym')
        if self._synonyms is _EMPTY_TUPLE:
            self._synonyms = kwargs.get('synonyms')
            if self._synonyms is None:
                self._synonyms = _EMPTY_TUPLE
        if self.rank is None:
            self._rank = kwargs.get('rank')
        if self._nomenclature_code:
            self._nomenclature_code = kwargs.get('nomenclature_code')
        if not self._unique_name:
            self._unique_name = kwargs.get('unique_name')
        if self._taxonomic_lineage is None:
            self._taxonomic_lineage = kwargs.get('taxonomic_lineage')
        if self._parent is None:
            self._parent = kwargs.get('parent')
            if self._parent is None and self._taxomachine_wrapper is not None and self._taxonomic_lineage:
                self._fill_parent_attr()
176986
def update_fields_values(params)
      params || return

      fields.each {|f| f.find_or_create_type_object(self).tap {|t| t || next
        params[f.code_name.to_sym].tap {|v| v && t.value = v}
        t.save }}
    end
724590
def change(obj, **changed_fields):
    
    obj_field_names = {
        field.name for field in obj._meta.fields
    } | {
        field.attname for field in obj._meta.fields
    } | {'pk'}

    for field_name, value in changed_fields.items():
        if field_name not in obj_field_names:
            raise ValueError("'{}' is an invalid field name".format(field_name))
        setattr(obj, field_name, value)
    return obj
896419
def update_relation(field_name, *obj)
      # Should be an Array of RDF::Term objects
      return unless obj

      obj.map! { |item| item.is_a?(RDF::URI) ? Ladder::Resource.from_uri(item) : item }
      relation = send(field_name)

      if Mongoid::Relations::Targets::Enumerable == relation.class
        obj.map { |item| relation.send(:push, item) unless relation.include? item }
      else
        send("#{field_name}=", obj.size > 1 ? obj : obj.first)
      end
    end
527364
def update_custom_field_options(self, custom_field_key, new_options,
                                    keep_existing_options):
        """"""
        custom_field_key = quote(custom_field_key, '')
        body = {
            "Options": new_options,
            "KeepExistingOptions": keep_existing_options}
        response = self._put(self.uri_for(
            "customfields/%s/options" % custom_field_key), json.dumps(body))
1246555
def update(self, obj, set_fields = None, unset_fields = None, update_obj = True):
        
        if set_fields:
            if isinstance(set_fields,(list,tuple)):
                set_attributes = {}
                for key in set_fields:
                    try:
                        set_attributes[key] = get_value(obj,key)
                    except KeyError:
                        pass
            else:
                set_attributes = set_fields
        else:
            set_attributes = {}
        if unset_fields:
            unset_attributes = unset_fields
        else:
            unset_attributes = []

        self.call_hook('before_update',obj,set_attributes,unset_attributes)

        if update_obj:
            for key,value in set_attributes.items():
                set_value(obj,key,value)
            for key in unset_attributes:
                delete_value(obj,key)

        return self.save(obj,call_hook = False)
244743
def update_deps( self ):
        """"""
        klass = self.__class__

        for name in klass._fields:
            self.update_deps_on_field( name )
        return
69104
def update(self, other):
        
        if type(self) != type(other):
            return NotImplemented
        else:
            if other.bad:
                self.error = other.error
                self.bad = True
            self._fieldDict.update(other._fieldDict)
701218
def update_field(self, name, update):
        
        for field in self.__next_descriptor['fields']:
            if field['name'] == name:
                field.update(update)
                return True
        return False
1225324
def _update_on_fields(prev_ele, new_ele):
    '''
    
    '''
    fields_update = dict(
        (prop_name, prop_val)
        for prop_name, prop_val in six.iteritems(new_ele)
        if new_ele.get(prop_name) != prev_ele.get(prop_name) or prop_name in _MATCH_KEYS
    )
    if len(set(fields_update.keys()) | set(_MATCH_KEYS)) > len(set(_MATCH_KEYS)):
        if 'id' not in fields_update:
            # in case of update, the ID is necessary
            # if not specified in the pillar,
            # will try to get it from the prev_ele
            fields_update['id'] = prev_ele['id']
        return fields_update
630599
def update_fields(fields)
      attributes[:id]        = fields['id'] || attributes[:id]
      attributes[:idPlugin]  = fields['idPlugin'] || attributes[:idPlugin]
      attributes[:scope]     = fields['scope'] || attributes[:scope]
      attributes[:value]     = JSON.parse(fields['value']).presence if fields.has_key?('value')
      attributes[:idModel]   = fields['idModel'] || attributes[:idModel]
      attributes[:access]    = fields['access'] || attributes[:access]
      self
    end
352396
def _update_what(self):
        
        if 'P31' not in self.data['claims']:  # missing Wikidata
            msg = ("Note: Wikidata item %s" % self.data['wikibase'],
                   "missing 'instance of' (P31)")
            utils.stderr(" ".join(msg))
            return

        instance_of = self.data['claims']['P31'][0]
        labels = self.data['labels']

        if instance_of in labels:
            self.data['what'] = labels[instance_of]
351091
def update_db_post_field_text(db_post_field, content, post_field_parent = nil)
      db_post_field.update(
        meta_datas: {
          label: content[:label] && !content[:label].blank? ? content[:label] : db_post_field.key,
          class: content[:class] && !content[:class].blank? ? content[:class] : nil
        }
      )
    end
499427
def update(self, other):
        
        if other.model._meta.abstract:
            self.local_fields.update(other.local_fields)
        self.fields.update(other.fields)
1023444
def _update_column_info(self):
		
		del self.columnnames[:]
		del self.columntypes[:]
		del self.columnpytypes[:]
		for child in self.getElementsByTagName(ligolw.Column.tagName):
			if self.validcolumns is not None:
				try:
					if self.validcolumns[child.Name] != child.Type:
						raise ligolw.ElementError("invalid type '%s' for Column '%s' in Table '%s', expected type '%s'" % (child.Type, child.getAttribute("Name"), self.getAttribute("Name"), self.validcolumns[child.Name]))
				except KeyError:
					raise ligolw.ElementError("invalid Column '%s' for Table '%s'" % (child.getAttribute("Name"), self.getAttribute("Name")))
			if child.Name in self.columnnames:
				raise ligolw.ElementError("duplicate Column '%s' in Table '%s'" % (child.getAttribute("Name"), self.getAttribute("Name")))
			self.columnnames.append(child.Name)
			self.columntypes.append(child.Type)
			try:
				self.columnpytypes.append(ligolwtypes.ToPyType[child.Type])
			except KeyError:
				raise ligolw.ElementError("unrecognized Type '%s' for Column '%s' in Table '%s'" % (child.Type, child.getAttribute("Name"), self.getAttribute("Name")))
32583
def update(self, model_obj):
        
        identifier = model_obj[self.entity_cls.meta_.id_field.field_name]
        with self.conn['lock']:
            # Check if object is present
            if identifier not in self.conn['data'][self.schema_name]:
                raise ObjectNotFoundError(
                    f'`{self.__class__.__name__}` object with identifier {identifier} '
                    f'does not exist.')

            self.conn['data'][self.schema_name][identifier] = model_obj
        return model_obj
26603
def update(collection_name, upsert, multi,
           spec, doc, safe, last_error_args, check_keys, opts):
    
    options = 0
    if upsert:
        options += 1
    if multi:
        options += 2

    data = _ZERO_32
    data += bson._make_c_string(collection_name)
    data += struct.pack("<i", options)
    data += bson.BSON.encode(spec, False, opts)
    encoded = bson.BSON.encode(doc, check_keys, opts)
    data += encoded
    if safe:
        (_, update_message) = __pack_message(2001, data)
        (request_id, error_message, _) = __last_error(collection_name,
                                                      last_error_args)
        return (request_id, update_message + error_message, len(encoded))
    else:
        (request_id, update_message) = __pack_message(2001, data)
        return (request_id, update_message, len(encoded))