Fixed Feed

This commit is contained in:
Anand Doshi 2014-04-04 16:26:45 +05:30
parent a504f0638b
commit bedc62f090
2 changed files with 46 additions and 45 deletions

View File

@ -1,5 +1,5 @@
{ {
"autoname": "_FEED.#####", "autoname": "hash",
"creation": "2012-07-03 13:29:42.000000", "creation": "2012-07-03 13:29:42.000000",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
@ -43,7 +43,7 @@
], ],
"icon": "icon-rss", "icon": "icon-rss",
"idx": 1, "idx": 1,
"modified": "2013-12-20 19:24:07.000000", "modified": "2013-12-20 19:24:05.000000",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Home", "module": "Home",
"name": "Feed", "name": "Feed",

View File

@ -3,6 +3,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe.utils import cint
@frappe.whitelist() @frappe.whitelist()
def get_feed(arg=None): def get_feed(arg=None):
@ -18,5 +19,5 @@ def get_feed(arg=None):
and ifnull(t2.`read`,0) = 1 and ifnull(t2.`read`,0) = 1
order by t1.modified desc order by t1.modified desc
limit %s, %s""" % (','.join(['%s']*len(roles)), '%s', '%s'), limit %s, %s""" % (','.join(['%s']*len(roles)), '%s', '%s'),
tuple(roles + [frappe.form_dict['limit_start'], frappe.form_dict['limit_page_length']]), tuple(roles + [cint(frappe.form_dict['limit_start']), cint(frappe.form_dict['limit_page_length'])]),
as_dict=1) as_dict=1)