Finished Release v2.1.3

This commit is contained in:
Kobi Tal 2022-11-29 15:17:14 +02:00
commit 45a9200ff6
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,10 @@
Change Log
==========
v2.1.3
------
- Fix pagination for models with alias columns
v2.1.2
------
- Add `QuerySet.model` to support django-rest-framework 3

View File

@ -319,7 +319,8 @@ class Database(object):
elif page_num < 1:
raise ValueError('Invalid page number: %d' % page_num)
offset = (page_num - 1) * page_size
query = 'SELECT * FROM $table'
query = 'SELECT {} FROM $table'.format(", ".join(model_class.fields().keys()))
if conditions:
if isinstance(conditions, Q):
conditions = conditions.to_sql(model_class)