misc: rename _xml_tagname as xml_root_node, for consistency (#45804)

This commit is contained in:
Frédéric Péters 2020-08-10 13:59:51 +02:00
parent 440b66af88
commit 85c112fe0e
6 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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']

View File

@ -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

View File

@ -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:

View File

@ -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