from .cfg_app import PpCfgAppError, PpConfigApplication
-__version__ = '0.7.3'
+__version__ = '0.7.4'
LOG = logging.getLogger(__name__)
# =============================================================================
result = tgt_cursor.fetchone()
if self.verbose > 3:
LOG.debug("Got max Zone Template Permission Id:\n{}".format(pp(result)))
- max_id = int(result[0])
+ if result[0] is not None:
+ max_id = int(result[0])
+ else:
+ max_id = 0
sql = "SELECT SETVAL('perm_templ_items_id_seq', %s)"
LOG.debug("Setting curval of perm_templ_items_id_seq to {} ...".format(max_id))
if self.verbose > 1:
INSERT INTO zone_templ_records (
zone_templ_id, name, type, content, ttl, prio)
VALUES (
- %(zone_templ_id)s, %(name)s, %(type)s, %(content)s, %(ttl)s, %(prio))
+ %(zone_templ_id)s, %(name)s, %(type)s, %(content)s, %(ttl)s, %(prio)s)
''').strip()
if self.verbose > 1:
LOG.debug("Target SQL:\n{}".format(tgt_sql))