id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 25287 Multiplying and dividing connectors for duration expressions are not supported on SQLite and MySQL. Ahmet DAL "I have a query using F expressions. When I run this query on PostgreSQL it works. But in tests with '''sqlite3''', it does not work; Here is my complex query. {{{ expires = Expire.objects.filter(ticket__date_opened__lte=(datetime.now() - F(""action__percent"") * F(""action__rule__duration"") / 100)) }}} Sqlite backend does not support connector *. When I looked into the code, it only supports + and - connectors. {{{ DatabaseError: Invalid connector for timedelta: *. }}} {{{ def combine_duration_expression(self, connector, sub_expressions): if connector not in ['+', '-']: raise utils.DatabaseError('Invalid connector for timedelta: %s.' % connector) fn_params = [""'%s'"" % connector] + sub_expressions if len(fn_params) > 3: raise ValueError('Too many params for timedelta operations.') return ""django_format_dtdelta(%s)"" % ', '.join(fn_params) }}} I tried to add * and / operator in the list; no problem occured. I think this can be fixed simply." New feature new Database layer (models, ORM) 3.0 Normal sqlite3, mysql, combine_duration_expression, F expressions, Accepted 0 0 0 0 0 0