def releasedoc(self, stage, **kwargs): from devpi.server.db_couch import get_releaseid doc = self.releasemetadata(**kwargs) doc["_id"] = get_releaseid(stage, name=doc["name"], version=doc["version"]) return doc