#36818: AttributeError: 'NoneType' object has no attribute 'getlimit' when 
calling
bulk_create as the first database operation on SQLite
-------------------------------------+-------------------------------------
     Reporter:  guro_ishiguro        |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  6.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  sqlite bulk_create   |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Varun Kasyap Pentamaraju):

 maybe something like this helps


 {{{
 diff --git a/django/db/backends/sqlite3/features.py
 b/django/db/backends/sqlite3/features.py
 --- a/django/db/backends/sqlite3/features.py
 +++ b/django/db/backends/sqlite3/features.py
 @@ -157,6 +157,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
          32766) or lowered per connection at run-time with
          setlimit(SQLITE_LIMIT_VARIABLE_NUMBER, N).
          """
 +        self.connection.ensure_connection()
          return
 self.connection.connection.getlimit(sqlite3.SQLITE_LIMIT_VARIABLE_NUMBER)

      @cached_property
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36818#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019b46900399-8f27eaa5-22a8-449b-8865-1d4751f40ed1-000000%40eu-central-1.amazonses.com.

Reply via email to