Skip to content

Commit

Permalink
[ckan#1434] add default_show_group_schema for customizing group show
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Apr 2, 2014
1 parent 3a13423 commit 49381d2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ckan/logic/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,22 @@ def default_update_group_schema():
schema["name"] = [ignore_missing, group_name_validator, unicode]
return schema

def default_show_group_schema():
schema = default_group_schema()

# make default show schema behave like when run with no validation
schema['num_followers'] = []
schema['created'] = []
schema['display_name'] = []
schema['extras'] = {'__extras': [ckan.lib.navl.validators.keep_extras]}
schema['package_count'] = []
schema['packages'] = {'__extras': [ckan.lib.navl.validators.keep_extras]}
schema['revision_id'] = []
schema['state'] = []
schema['users'] = {'__extras': [ckan.lib.navl.validators.keep_extras]}

return schema


def default_related_schema():
schema = {
Expand Down

0 comments on commit 49381d2

Please sign in to comment.