[Hejes-devel] [980] blog bugfix: showed tags for non-showing posts

hejes-devel at nytud.hu hejes-devel at nytud.hu
Tue Oct 8 17:36:40 CEST 2013


Revision: 980
Author:   mihaltz
Date:     2013-10-08 17:36:40 +0200 (Tue, 08 Oct 2013)
Log Message:
-----------
blog bugfix: showed tags for non-showing posts

Modified Paths:
--------------
    trunk/web2py/applications/helyesiras_webdev/databases/storage.sqlite
    trunk/web2py/applications/helyesiras_webdev/models/dbblog.py
    trunk/web2py/applications/helyesiras_webdev/progress.log

Modified: trunk/web2py/applications/helyesiras_webdev/databases/storage.sqlite
===================================================================
(Binary files differ)

Modified: trunk/web2py/applications/helyesiras_webdev/models/dbblog.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/models/dbblog.py	2013-10-08 15:17:05 UTC (rev 979)
+++ trunk/web2py/applications/helyesiras_webdev/models/dbblog.py	2013-10-08 15:36:40 UTC (rev 980)
@@ -44,7 +44,7 @@
   for row in dbblog(dbblog.tags.posts.contains(id)).select():
     if row.name not in mytags:
       if len(row.posts) > 1:
-        dbblog(dbblog.tags.id == rid).update(posts = [x for x in row.posts if x != id]) # remove reference to post in question
+        dbblog(dbblog.tags.id == row.id).update(posts = [x for x in row.posts if x != id]) # remove reference to post in question
       else:
         to_delete.append(row.id) # schedule for deleting
   for rid in to_delete: # delete
@@ -82,7 +82,7 @@
   to_delete = [] # ids of records that have to be deleted from table tags
   for row in dbblog(dbblog.tags.posts.contains(id)).select():
     if len(row.posts) > 1:
-      print('update tags set posts={0} where id={1}'.format([x for x in row.posts if x != id], row.id))
+      #print('update tags set posts={0} where id={1}'.format([x for x in row.posts if x != id], row.id))
       dbblog(dbblog.tags.id == row.id).update(posts = [x for x in row.posts if x != id]) # remove reference to post in question
       dbblog.commit()
     else:

Modified: trunk/web2py/applications/helyesiras_webdev/progress.log
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/progress.log	2013-10-08 15:17:05 UTC (rev 979)
+++ trunk/web2py/applications/helyesiras_webdev/progress.log	2013-10-08 15:36:40 UTC (rev 980)
@@ -942,3 +942,5 @@
 [2013-10-08 16:46:47] EDIT helyesiras_webdev/views/blog/show.html: 0
 [2013-10-08 16:51:06] EDIT helyesiras_webdev/static/css/main.css: 0
 [2013-10-08 17:06:59] EDIT helyesiras_webdev/modules/util.py: 0
+[2013-10-08 17:31:49] EDIT helyesiras_webdev/models/dbblog.py: 0
+[2013-10-08 17:33:32] EDIT helyesiras_webdev/models/dbblog.py: 0




More information about the Hejes-devel mailing list