Pastebin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- sf.gutenberg/sf/gutenberg/model/misc.py
+++ sf.gutenberg/sf/gutenberg/model/misc.py
@@ -1077,20 +1077,21 @@ class DownloadHistory(Document):
                     # Historically date=file_timestamp meant dismissed. This
                     # caused problems but should stay until relevant
                     # historical data can be updated using the dismissed attr.
-                    is_ts_mismatch = release.get('date') != ts
-                    dismissed = download.get('dismissed', False)
-                    if release and is_ts_mismatch and not dismissed:
-                        if project['shortname'] not in seen_projects:
-                            seen_projects.append(project['shortname'])
-                            download_updates.append(dict(
-                                project_name=project.name,
-                                shortname=project.shortname,
-                                icon_url=download.icon_url,
-                                filename=release.get('filename'),
-                                url=release.get('url'),
-                                date=release.get('date'),
-                                download_history_id=download._id
-                            ))
+                    if release:
+                        is_ts_mismatch = release.get('date') != ts
+                        dismissed = download.get('dismissed', False)
+                        if release and is_ts_mismatch and not dismissed:
+                            if project['shortname'] not in seen_projects:
+                                seen_projects.append(project['shortname'])
+                                download_updates.append(dict(
+                                    project_name=project.name,
+                                    shortname=project.shortname,
+                                    icon_url=download.icon_url,
+                                    filename=release.get('filename'),
+                                    url=release.get('url'),
+                                    date=release.get('date'),
+                                    download_history_id=download._id
+                                ))

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks