File: 10_ignore_unknown_columns.patch

package info (click to toggle)
trac-codecomments 1.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 348 kB
  • ctags: 191
  • sloc: python: 593; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 561 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Author: <debacle@debian.org>
Description: ignore unknown columns

--- a/code_comments/comments.py	2013-03-24 20:55:34.145479940 +0100
+++ b/code_comments/comments.py	2013-03-24 20:57:21.741486233 +0100
@@ -78,6 +78,9 @@
         conditions = []
         values = []
         for name in args:
+            # ignore unknown columns
+            if not name in Comment.columns:
+                continue
             if not name.endswith('__in') and not name.endswith('__prefix'):
                 values.append(args[name])
             if name.endswith('__gt'):