zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #02466
[Merge] lp:~seif/zeitgeist/fix-redundant-statement into lp:zeitgeist
Seif Lotfy has proposed merging lp:~seif/zeitgeist/fix-redundant-statement into lp:zeitgeist.
Requested reviews:
Zeitgeist Framework Team (zeitgeist)
Basically I found this statement. For me we could get rid of one of them. Right now using only one statement of both works for all our test cases.
if return_mode == 0:
sql = "SELECT DISTINCT id FROM event_view"
elif return_mode == 1:
sql = "SELECT id FROM event_view"
Do we really need both? In any case here is a little merge proposal
--
https://code.launchpad.net/~seif/zeitgeist/fix-redundant-statement/+merge/41751
Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~seif/zeitgeist/fix-redundant-statement into lp:zeitgeist.
=== modified file '_zeitgeist/engine/main.py'
--- _zeitgeist/engine/main.py 2010-11-12 18:09:45 +0000
+++ _zeitgeist/engine/main.py 2010-11-24 15:51:17 +0000
@@ -335,9 +335,7 @@
if not where.may_have_results():
return []
- if return_mode == 0:
- sql = "SELECT DISTINCT id FROM event_view"
- elif return_mode == 1:
+ if return_mode in (0,1):
sql = "SELECT id FROM event_view"
else:
raise NotImplementedError, "Unsupported return_mode."
Follow ups