Skip to content

Commit

Permalink
get_provision_xml --> get_provision_element
Browse files Browse the repository at this point in the history
  • Loading branch information
goose-life committed Jan 16, 2025
1 parent b705695 commit 7b078a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion indigo_api/models/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def change_date(self, new_date, user, comment=None):
self.expression_date = new_date
self.save_with_revision(user, comment=comment)

def get_provision_xml(self, provision_eid):
def get_provision_element(self, provision_eid):
provision_xml = self.doc.get_portion_element(provision_eid)
if provision_xml is None:
return None
Expand Down
2 changes: 1 addition & 1 deletion indigo_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def updated_xml(self):
return document.document_xml
# otherwise, return only the provision being edited (NOT including the outer akn tag)
# if we used the full XML for the analysis, grab only the appropriate provision as a portion
xml = document.get_provision_xml(provision_eid) if self.use_full_xml else document.doc.portion
xml = document.get_provision_element(provision_eid) if self.use_full_xml else document.doc.portion
return etree.tostring(xml, encoding='unicode')


Expand Down
2 changes: 1 addition & 1 deletion indigo_app/views/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class DocumentProvisionDetailView(DocumentDetailView):
def get(self, request, *args, **kwargs):
document = self.get_object()
self.eid = self.kwargs.get('eid')
self.provision_xml = document.get_provision_xml(self.eid)
self.provision_xml = document.get_provision_element(self.eid)
if self.provision_xml is None:
messages.error(request, _("No provision with this id found: '%(eid)s'") % {"eid": self.eid})
return redirect('choose_document_provision', doc_id=document.id)
Expand Down

0 comments on commit 7b078a8

Please sign in to comment.