From cb19c8407034ca6cd9592621ff1066c23a65d163 Mon Sep 17 00:00:00 2001 From: Karl Date: Mon, 13 Nov 2017 11:01:35 +0000 Subject: [PATCH] Update 0008_reports.py PG10 version string appears to, at least on Windows, contain a comma. --- netbox/extras/migrations/0008_reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/migrations/0008_reports.py b/netbox/extras/migrations/0008_reports.py index 83565cce7..c51fba9cd 100644 --- a/netbox/extras/migrations/0008_reports.py +++ b/netbox/extras/migrations/0008_reports.py @@ -18,7 +18,7 @@ def verify_postgresql_version(apps, schema_editor): with connection.cursor() as cursor: cursor.execute("SELECT VERSION()") row = cursor.fetchone() - pg_version = row[0].split()[1] + pg_version = re.match('^PostgreSQL (\d+\.\d+(\.\d+)?)', row[0])[1] if StrictVersion(pg_version) < StrictVersion('9.4.0'): raise Exception("PostgreSQL 9.4.0 or higher is required ({} found). Upgrade PostgreSQL and then run migrations again.".format(pg_version))