Trying to migrate in Django 1.9 — strange SQL error “django.db.utils.OperationalError: near ”)“: syntax error”

前端 未结 2 651
予麋鹿
予麋鹿 2021-02-13 09:31

I don\'t have a clue what\'s causing this error. It appears to be a bug that there isn\'t a fix for. Could anyone tell give me a hint as to how I might get around this? It\'s

2条回答
  •  失恋的感觉
    2021-02-13 10:10

    Edit base.py in the lines that breaks and update it to:

    def execute(self, query, params=None):
        if params is None:
            if '()' not in str(query):
                return Database.Cursor.execute(self, query)
        query = self.convert_query(query)
        if '()' not in str(query):
            return Database.Cursor.execute(self, query, params)
    

提交回复
热议问题