Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 138d2fd

Browse files
author
David Read
committed
[ckan#2130] Decided to exclude private datasets from the number a user created.
1 parent b2dfccc commit 138d2fd

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

ckan/logic/action/get.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ def user_show(context, data_dict):
13201320

13211321
if context.get('return_minimal'):
13221322
log.warning('Use of the "return_minimal" in user_show is '
1323-
'deprecated.')
1323+
'deprecated.')
13241324
return user_dict
13251325

13261326
if data_dict.get('include_datasets', False):

ckan/model/user.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ def number_created_packages(self):
201201
import ckan.model as model
202202
q = meta.Session.query(model.Package)\
203203
.filter_by(creator_user_id=self.id)\
204-
.filter_by(state='active')
204+
.filter_by(state='active')\
205+
.filter_by(private=False)
205206
return q.count()
206207

207208
def activate(self):

0 commit comments

Comments
 (0)