ensure status map does not contain status values which are not present in DB
197416
def check_status_mapping(self):
        
        self.verbose('checking status mapping...')

        if not self.status_mapping:
            self.message('no status mapping found')
            return

        for old_val, new_val in self.status_mapping.iteritems():
            try:
                # look up by slug if new_val is string
                if isinstance(new_val, basestring):
                    lookup = {'slug': new_val}
                # lookup by primary key otherwise
                else:
                    lookup = {'pk': new_val}
                status = Status.objects.get(**lookup)
                self.status_mapping[old_val] = status.id
            except Status.DoesNotExist:
                raise ImproperlyConfigured('Error! Status with slug %s not found in the database' % new_val)

        self.verbose('status map correct')
102087
def check(self):
        """"""

        if len(self.status_datasets) == 0:
            return False
        if all(self.status_datasets):
            return True
        return False
362549
def set_status(
        db,
        aid: int,
        complete: Any,
        watched_episodes: int,
) -> None:
    """"""
    upsert(db, 'cache_anime', ['aid'], {
        'aid': aid,
        'complete': 1 if complete else 0,
        'watched_episodes': watched_episodes,
    })
586744
def with_statuses(issue_statuses)
      if name == 'status_id'
        format 'Status: %s => %s',
               find_issue_status(issue_statuses, old_value),
               find_issue_status(issue_statuses, new_value)
      else
        to_s
      end
    end
1038968
protected void validate(List<TableInfo> tableInfos)
    {
        db = mongo.getDB(databaseName);
        if (db == null)
        {
            logger.error("Database " + databaseName + "does not exist");
            throw new SchemaGenerationException("database " + databaseName + "does not exist", "mongoDb", databaseName);
        }
        else
        {
            for (TableInfo tableInfo : tableInfos)
            {
                if (tableInfo.getLobColumnInfo().isEmpty())
                {
                    if (!db.collectionExists(tableInfo.getTableName()))
                    {
                        logger.error("Collection " + tableInfo.getTableName() + "does not exist in db " + db.getName());
                        throw new SchemaGenerationException("Collection " + tableInfo.getTableName()
                                + " does not exist in db " + db.getName(), "mongoDb", databaseName,
                                tableInfo.getTableName());
                    }
                }
                else
                {
                    checkMultipleLobs(tableInfo);
                    if (!db.collectionExists(tableInfo.getTableName() + MongoDBUtils.FILES))
                    {
                        logger.error("Collection " + tableInfo.getTableName() + MongoDBUtils.FILES
                                + "does not exist in db " + db.getName());
                        throw new SchemaGenerationException("Collection " + tableInfo.getTableName()
                                + " does not exist in db " + db.getName(), "mongoDb", databaseName,
                                tableInfo.getTableName());
                    }
                    if (!db.collectionExists(tableInfo.getTableName() + MongoDBUtils.CHUNKS))
                    {
                        logger.error("Collection " + tableInfo.getTableName() + MongoDBUtils.CHUNKS
                                + "does not exist in db " + db.getName());
                        throw new SchemaGenerationException("Collection " + tableInfo.getTableName()
                                + " does not exist in db " + db.getName(), "mongoDb", databaseName,
                                tableInfo.getTableName());
                    }

                }
            }
        }
    }
800455
def status(self, column=None, value=None, **kwargs):
        
        return self._resolve_call('GIC_STATUS', column, value, **kwargs)
689661
static boolean safeContainsKey(Map<?, ?> map, Object key) {
    checkNotNull(map);
    try {
      return map.containsKey(key);
    } catch (ClassCastException e) {
      return false;
    } catch (NullPointerException e) {
      return false;
    }
  }
349046
def check_purge_status(self, purge_id):
		""""""
		content = self._fetch("/purge?id=%s" % purge_id)
		return map(lambda x: FastlyPurgeStatus(self, x), content)
1367338
public void setStatusMapping(Map<String, Integer> statusMapping) {
		Assert.notNull(statusMapping, "StatusMapping must not be null");
		this.statusMapping = new HashMap<>(statusMapping);
	}
937073
def get_status(self):
        """"""

        result = ''
        if self._data_struct is not None:
            result = self._data_struct[KEY_STATUS]
        return result
1101184
def absent(name, **kwargs):
    '''
    
    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    if not __salt__['mssql.user_exists'](name):
        ret['comment'] = 'User {0} is not present'.format(name)
        return ret
    if __opts__['test']:
        ret['result'] = None
        ret['comment'] = 'User {0} is set to be removed'.format(name)
        return ret
    if __salt__['mssql.user_remove'](name, **kwargs):
        ret['comment'] = 'User {0} has been removed'.format(name)
        ret['changes'][name] = 'Absent'
        return ret
    # else:
    ret['result'] = False
    ret['comment'] = 'User {0} failed to be removed'.format(name)
    return ret
1198772
public static Map<Status, Long> getStatusMapWithNonZeroValues(final Map<Status, Long> statusTotalCountMap) {
        return statusTotalCountMap.entrySet().stream().filter(p -> p.getValue() > 0)
                .collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue()));
    }
266902
public void addStatusMapping(Map<String, Integer> statusMapping) {
		Assert.notNull(statusMapping, "StatusMapping must not be null");
		this.statusMapping.putAll(statusMapping);
	}
194475
def set(self, status_item, status):
        
        lg = logging.getLogger("%s.%s" % (self.ln, inspect.stack()[0][3]))
        lg.setLevel(self.log_level)
        sparql = '''
            DELETE {{
                kdr:{0} kds:{1} ?o
            }}
            INSERT {{
                kdr:{0} kds:{1} "{2}"^^xsd:boolean
            }}
            WHERE {{
                OPTIONAL {{ kdr:{0} kds:{1} ?o }}
            }}'''
        return self.conn.query(sparql=sparql.format(self.group,
                                                     status_item,
                                                     str(status).lower()),
                                mode='update')
732729
def reset_status(self):
        """"""
        for row in range(self.table.rowCount()):
            status_item = self.table.item(row, 1)
            status_item.setText(self.tr(''))
673861
public void saveAsEmpty(DbSession dbSession, String key) {
    checkKey(key);

    InternalPropertiesMapper mapper = getMapper(dbSession);
    mapper.deleteByKey(key);
    mapper.insertAsEmpty(key, system2.now());
  }
1069227
function getTableStatus(model, cb) {
    function decoratedCallback(err, data) {
      if (err) {
        console.error(err);
      }
      if (!err) {
        data.forEach(function (field) {
          field.type = mapSQLiteDatatypes(field.type);
        });
      }
      cb(err, data);
    }

    var sql = null;
    sql = 'PRAGMA table_info(' + this.tableEscaped(model) +')';
    var params = [];
    params.status = true;
    this.executeSQL(sql, params, decoratedCallback);
  }