Made DatabaseWrapper.oracle_version() return a full version tuple.

This commit is contained in:
Mariusz Felisiak 2018-09-26 08:51:27 +02:00 committed by GitHub
parent 82f286cf6f
commit 90d93a1b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -300,17 +300,10 @@ class DatabaseWrapper(BaseDatabaseWrapper):
else:
return True
@cached_property
def oracle_full_version(self):
with self.temporary_connection():
return self.connection.version
@cached_property
def oracle_version(self):
try:
return int(self.oracle_full_version.split('.')[0])
except ValueError:
return None
with self.temporary_connection():
return tuple(int(x) for x in self.connection.version.split('.'))
class OracleParam: