community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r1694775 - /comdev/tools/events_list/views.py
Date Sat, 08 Aug 2015 06:53:07 GMT
Author: rgardler
Date: Sat Aug  8 06:53:07 2015
New Revision: 1694775

URL: http://svn.apache.org/r1694775
Log:
add some duplicate removal

Modified:
    comdev/tools/events_list/views.py

Modified: comdev/tools/events_list/views.py
URL: http://svn.apache.org/viewvc/comdev/tools/events_list/views.py?rev=1694775&r1=1694774&r2=1694775&view=diff
==============================================================================
--- comdev/tools/events_list/views.py (original)
+++ comdev/tools/events_list/views.py Sat Aug  8 06:53:07 2015
@@ -254,6 +254,17 @@ def _callMeetupsCom(hashtag):
     for g in grps:
         grp_deets[ g['id'] ] = g
 
+    # Remove duplicate entries (where duplicates are defined by events
+    # with the same name at the same UTC time (some groups spam
+    # meetups.com with multuple entries)
+    for meetup in meetups:
+        for m in meetups:
+            if meetup['id'] != m['id']:
+                if meetup['name'] == m['name']:
+                    if meetup['time'] == m['time']:
+                        if meetup['utc_offset'] == m['utc_offset']:
+                            meetups.remove(m)
+                            
     for meetup in meetups:
         # Group information ...
         grp = grp_deets[ meetup['group']['id'] ]



Mime
View raw message