Commit 6e76090d48771cfb01a28e464240e812fe7abe23
1 parent
bbe02223
Exists in
master
função de busca e exclusão de órgãos
Showing
2 changed files
with
17 additions
and
1 deletions
Show diff stats
development.ini
wscacicneo/model/orgao.py
... | ... | @@ -190,3 +190,19 @@ class Orgao(orgao_base.metaclass): |
190 | 190 | return None |
191 | 191 | |
192 | 192 | return result |
193 | + | |
194 | + def search_orgao(self, nm_orgao): | |
195 | + """ | |
196 | + Busca registro completo do órgao pelo nome | |
197 | + """ | |
198 | + result = self.documentrest.get_collection(search_obj=Search(literal="document->>'"+nm_orgao+"' = 'Ministério da fazenda '")) | |
199 | + | |
200 | + return results | |
201 | + | |
202 | + def delete_orgao(self, id): | |
203 | + """ | |
204 | + Deleta o Órgao apartir do ID | |
205 | + """ | |
206 | + resulst = self.documentrest.delete(id) | |
207 | + | |
208 | + return results | ... | ... |