Whole file
kayak/pypika
The author described this change as “Fix columns with empty args”. It counts as a record because the check below fails on the code as it stood at a8348a2c9 and passes on 4c177e817, with nothing else changed between the two runs.
Projectkayak/pypika
Fix saved2020-05-05
Sharing licenceApache-2.0 · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
Fix columns with empty args
The change
| 772 | 772 | if self._insert_table is None: | |
| 773 | 773 | raise AttributeError("'Query' object has no attribute '%s'" % "insert") | |
| 774 | 774 | ||
| 775 | - | if isinstance(terms[0], (list, tuple)): | |
| 775 | + | if terms and isinstance(terms[0], (list, tuple)): | |
| 776 | 776 | terms = terms[0] | |
| 777 | 777 | ||
| 778 | 778 | for term in terms: |
The check that tells the two apart
fail→pass·pypika/tests/test_inserts.py::InsertIntoTests::test_insert_empty_columns
Check file pypika/tests/test_inserts.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before ita8348a2c9f55dab9907b667c412611f4777dc1c4
Broken version dated2020-04-30
Modulepypika.queries
Units changedQueryBuilder
Fingerprintd02e019a87bbb703
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in kayak/pypika
- 2024-04-17fix `Field.__init__` (#742)
- 2023-09-26Fix: Allow the usage of `frozenset` in the `isin(...)` and `notin(...)` functions (#744)
- 2023-09-22fix(terms): fixed EmptyCriterion bug with ComplexCriterion (#732)
- 2021-08-26MySQLQuery
- 2021-01-11Fix empty Postgres array syntax (#539)
- 2021-01-04Fix PostgreSQLQueryBuilder returning clause code causing Py3.9 test failures