Test zu Fake geändert, weil Namensproblem
Dieser Commit ist enthalten in:
@@ -42,7 +42,7 @@ def batch_create():
|
||||
valid_from = request.form['valid_from']
|
||||
valid_until = request.form['valid_until']
|
||||
device_limit = int(request.form['device_limit'])
|
||||
is_test = 'is_test' in request.form
|
||||
is_fake = 'is_fake' in request.form
|
||||
|
||||
# Validierung
|
||||
if count < 1 or count > 100:
|
||||
@@ -74,13 +74,13 @@ def batch_create():
|
||||
INSERT INTO licenses (
|
||||
license_key, customer_id,
|
||||
license_type, valid_from, valid_until, device_limit,
|
||||
is_test, created_at
|
||||
is_fake, created_at
|
||||
) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)
|
||||
RETURNING id
|
||||
""", (
|
||||
license_key, customer_id,
|
||||
license_type, valid_from, valid_until, device_limit,
|
||||
is_test, datetime.now()
|
||||
is_fake, datetime.now()
|
||||
))
|
||||
|
||||
license_id = cur.fetchone()[0]
|
||||
@@ -141,7 +141,7 @@ def batch_export():
|
||||
SELECT
|
||||
l.license_key, c.name, c.email,
|
||||
l.license_type, l.valid_from, l.valid_until,
|
||||
l.device_limit, l.is_test, l.created_at
|
||||
l.device_limit, l.is_fake, l.created_at
|
||||
FROM licenses l
|
||||
JOIN customers c ON l.customer_id = c.id
|
||||
WHERE l.id = ANY(%s)
|
||||
@@ -158,7 +158,7 @@ def batch_export():
|
||||
'valid_from': row[4],
|
||||
'valid_until': row[5],
|
||||
'device_limit': row[6],
|
||||
'is_test': row[7],
|
||||
'is_fake': row[7],
|
||||
'created_at': row[8]
|
||||
})
|
||||
|
||||
@@ -334,13 +334,13 @@ def batch_import():
|
||||
INSERT INTO licenses (
|
||||
license_key, customer_id,
|
||||
license_type, valid_from, valid_until, device_limit,
|
||||
is_test, created_at
|
||||
is_fake, created_at
|
||||
) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)
|
||||
RETURNING id
|
||||
""", (
|
||||
license_key, customer_id,
|
||||
row['license_type'], row['valid_from'], row['valid_until'],
|
||||
int(row['device_limit']), row.get('is_test', False),
|
||||
int(row['device_limit']), row.get('is_fake', False),
|
||||
datetime.now()
|
||||
))
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren