Changes between Initial Version and Version 1 of Ticket #32418
- Timestamp:
- Feb 4, 2021, 5:38:10 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32418 – Description
initial v1 1 1 My code: 2 ```python 2 3 4 {{{ 3 5 duration_expression = ExpressionWrapper( 4 6 datetime.timedelta(minutes=1) * F('duration'), … … 24 26 Q(Q(booking_end__lte=first_interval), 25 27 Q(booking_end__gte=next_interval))) 26 ``` 28 }}} 29 30 27 31 28 32 Error I get: 29 ``` 33 34 35 {{{ 30 36 (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* `carwashes_carwashbooking`.`duration`) MICROSECOND) AS `booking_end` FROM `car' at line 1") 31 ``` 37 }}} 38 32 39 33 40 SQL query: 34 ```sql 41 42 43 {{{ 35 44 ('SELECT `carwashes_carwashbooking`.`id`, ' 36 45 '`carwashes_carwashbooking`.`carwash_id`, ' … … 54 63 'MICROSECOND * `carwashes_carwashbooking`.`duration`) MICROSECOND) >= %s))) ' 55 64 'LIMIT 21') 56 ``` 65 }}} 66 67 57 68 58 69 Stackoverflow issue: https://stackoverflow.com/questions/66044255/django-returns-sql-syntax-error-when-using-expressionwrapper-and-f-expressions