Skip to content

Commit 18cfc8c

Browse files
committed
fix: MySQL patch逻辑里去除对django版本的判断 #94
1 parent 0fbfa23 commit 18cfc8c

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • runtime/bk-plugin-runtime/bk_plugin_runtime/config

runtime/bk-plugin-runtime/bk_plugin_runtime/config/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ def minimum_database_version(self):
5858
django_version = django.VERSION
5959
if self.connection.mysql_is_mariadb:
6060
return 10, 4
61-
elif django_version < (4, 0):
62-
import pymysql
63-
pymysql.install_as_MySQLdb()
64-
return 5, 7
6561
else:
66-
return 8, 0
62+
return 5, 7
6763

6864
# 目前 Django 仅是对 5.7 做了软性的不兼容改动,在没有使用 8.0 特异的功能时,对 5.7 版本的使用无影响
6965
DatabaseFeatures.minimum_database_version = PatchFeatures.minimum_database_version

0 commit comments

Comments
 (0)