misc: rename _xml_tagname as xml_root_node, for consistency (#45804)
This commit is contained in:
parent
440b66af88
commit
85c112fe0e
|
@ -26,7 +26,7 @@ from .qommon.xml_storage import XmlStorableObject
|
|||
|
||||
class Category(XmlStorableObject):
|
||||
_names = 'categories'
|
||||
_xml_tagname = 'category'
|
||||
xml_root_node = 'category'
|
||||
name = None
|
||||
url_name = None
|
||||
description = None
|
||||
|
|
|
@ -295,7 +295,7 @@ def get_object(data_source):
|
|||
class NamedDataSource(XmlStorableObject):
|
||||
_names = 'datasources'
|
||||
_indexes = ['slug']
|
||||
_xml_tagname = 'datasource'
|
||||
xml_root_node = 'datasource'
|
||||
|
||||
name = None
|
||||
slug = None
|
||||
|
|
|
@ -25,7 +25,7 @@ from wcs.workflows import Workflow
|
|||
|
||||
class LoggedError(XmlStorableObject):
|
||||
_names = 'logged-errors'
|
||||
_xml_tagname = 'error'
|
||||
xml_root_node = 'error'
|
||||
_indexes = ['tech_id']
|
||||
_hashed_indexes = ['formdef_id', 'workflow_id']
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ from wcs.qommon.xml_storage import XmlStorableObject
|
|||
|
||||
class MailTemplate(XmlStorableObject):
|
||||
_names = 'mail-templates'
|
||||
_xml_tagname = 'mail-template'
|
||||
xml_root_node = 'mail-template'
|
||||
|
||||
name = None
|
||||
slug = None
|
||||
|
|
|
@ -43,7 +43,7 @@ class XmlStorableObject(StorableObject):
|
|||
|
||||
def export_to_xml(self, include_id=False):
|
||||
charset = get_publisher().site_charset
|
||||
root = ET.Element(self._xml_tagname)
|
||||
root = ET.Element(self.xml_root_node)
|
||||
if include_id and self.id:
|
||||
root.attrib['id'] = str(self.id)
|
||||
for attribute in self.XML_NODES:
|
||||
|
|
|
@ -127,7 +127,7 @@ def call_webservice(url, qs_data=None, request_signature_key=None,
|
|||
|
||||
class NamedWsCall(XmlStorableObject):
|
||||
_names = 'wscalls'
|
||||
_xml_tagname = 'wscall'
|
||||
xml_root_node = 'wscall'
|
||||
|
||||
name = None
|
||||
slug = None
|
||||
|
|
Loading…
Reference in New Issue