pep8
This commit is contained in:
parent
bd7bc69468
commit
ccc0110b1a
|
@ -582,8 +582,8 @@ class WcsFormdefFeeder(object):
|
|||
columns.append([at, 'smallint REFERENCES {role_table} (id)'])
|
||||
comments[at] = u'fonction « %s »' % name
|
||||
|
||||
self.columns = ([name for name, _type in self.olap_feeder.columns]
|
||||
+ [name for name, _type in columns])
|
||||
self.columns = ([name for name, _type in self.olap_feeder.columns] + [
|
||||
name for name, _type in columns])
|
||||
self.columns.remove('geolocation_base')
|
||||
|
||||
self.create_table('{formdata_table}', columns, inherits='{generic_formdata_table}',
|
||||
|
@ -594,7 +594,7 @@ class WcsFormdefFeeder(object):
|
|||
# Creat index for JSON fields
|
||||
if self.has_jsonb:
|
||||
for field in fields:
|
||||
if field.varname and not '-' in field.varname:
|
||||
if field.varname and '-' not in field.varname:
|
||||
self.create_formdata_json_index(field.varname)
|
||||
|
||||
# PostgreSQL does not propagate foreign key constraints to child tables
|
||||
|
@ -775,7 +775,7 @@ class WcsFormdefFeeder(object):
|
|||
if generic_evolutions:
|
||||
self.ex('INSERT INTO {generic_evolution_table} (%s) VALUES %s' % (
|
||||
', '.join(['formdata_id', 'generic_status_id', 'time', 'date', 'hour_id']),
|
||||
', '.join(['%s'] * len(generic_evolutions))), vars=generic_evolutions)
|
||||
', '.join(['%s'] * len(generic_evolutions))), vars=generic_evolutions)
|
||||
|
||||
# insert evolutions
|
||||
evolutions = []
|
||||
|
@ -784,10 +784,10 @@ class WcsFormdefFeeder(object):
|
|||
row[0] = formdata_id
|
||||
evolutions.append(tuple(row))
|
||||
if len(evolutions) == 500:
|
||||
self.ex('INSERT INTO {evolution_table} (%s) VALUES %s' % (
|
||||
self.ex('INSERT INTO {evolution_table} (%s) VALUES %s' % (
|
||||
', '.join(['formdata_id', 'status_id', 'time', 'date', 'hour_id']),
|
||||
', '.join(['%s'] * len(evolutions))), vars=evolutions)
|
||||
evolutions = []
|
||||
evolutions = []
|
||||
if evolutions:
|
||||
self.ex('INSERT INTO {evolution_table} (%s) VALUES %s' % (
|
||||
', '.join(['formdata_id', 'status_id', 'time', 'date', 'hour_id']),
|
||||
|
|
Loading…
Reference in New Issue