Skip to content

Commit

Permalink
[ckan#3067] consistent spacing between functions
Browse files Browse the repository at this point in the history
  • Loading branch information
k-nut committed May 25, 2016
1 parent 045582e commit 76495e6
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions ckan/logic/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ def default_resource_schema():

return schema


def default_update_resource_schema():
schema = default_resource_schema()
schema['revision_id'] = [ignore]
return schema


def default_tags_schema():
schema = {
'name': [not_missing,
Expand All @@ -117,6 +119,7 @@ def default_tags_schema():
}
return schema


def default_create_tag_schema():
schema = default_tags_schema()
# When creating a tag via the tag_create() logic action function, a
Expand Down Expand Up @@ -169,6 +172,7 @@ def default_create_package_schema():
}
return schema


def default_update_package_schema():
schema = default_create_package_schema()

Expand All @@ -191,6 +195,7 @@ def default_update_package_schema():

return schema


def default_show_package_schema():
schema = default_create_package_schema()

Expand Down Expand Up @@ -263,6 +268,7 @@ def default_show_package_schema():

return schema


def default_group_schema():

schema = {
Expand Down Expand Up @@ -300,6 +306,7 @@ def default_group_schema():
}
return schema


def group_form_schema():
schema = default_group_schema()
#schema['extras_validation'] = [duplicate_extras_key, ignore]
Expand All @@ -322,6 +329,7 @@ def default_update_group_schema():
schema["name"] = [ignore_missing, group_name_validator, unicode]
return schema


def default_show_group_schema():
schema = default_group_schema()

Expand All @@ -338,6 +346,7 @@ def default_show_group_schema():

return schema


def default_extras_schema():

schema = {
Expand All @@ -351,6 +360,7 @@ def default_extras_schema():
}
return schema


def default_relationship_schema():

schema = {
Expand All @@ -363,6 +373,7 @@ def default_relationship_schema():
}
return schema


def default_create_relationship_schema():

schema = default_relationship_schema()
Expand All @@ -372,6 +383,7 @@ def default_create_relationship_schema():

return schema


def default_update_relationship_schema():

schema = default_relationship_schema()
Expand All @@ -386,8 +398,6 @@ def default_update_relationship_schema():
return schema




def default_user_schema():

schema = {
Expand All @@ -408,6 +418,7 @@ def default_user_schema():
}
return schema


def user_new_form_schema():
schema = default_user_schema()

Expand All @@ -416,6 +427,7 @@ def user_new_form_schema():

return schema


def user_edit_form_schema():
schema = default_user_schema()

Expand All @@ -425,6 +437,7 @@ def user_edit_form_schema():

return schema


def default_update_user_schema():
schema = default_user_schema()

Expand All @@ -433,12 +446,14 @@ def default_update_user_schema():

return schema


def default_generate_apikey_user_schema():
schema = default_update_user_schema()

schema['apikey'] = [not_empty, unicode]
return schema


def default_user_invite_schema():
schema = {
'email': [not_empty, unicode],
Expand All @@ -447,6 +462,7 @@ def default_user_invite_schema():
}
return schema


def default_task_status_schema():
schema = {
'id': [ignore],
Expand All @@ -461,6 +477,7 @@ def default_task_status_schema():
}
return schema


def default_vocabulary_schema():
schema = {
'id': [ignore_missing, unicode, vocabulary_id_exists],
Expand All @@ -469,17 +486,20 @@ def default_vocabulary_schema():
}
return schema


def default_create_vocabulary_schema():
schema = default_vocabulary_schema()
schema['id'] = [empty]
return schema


def default_update_vocabulary_schema():
schema = default_vocabulary_schema()
schema['id'] = [ignore_missing, vocabulary_id_not_changed]
schema['name'] = [ignore_missing, vocabulary_name_validator]
return schema


def default_create_activity_schema():
schema = {
'id': [ignore],
Expand All @@ -496,11 +516,13 @@ def default_create_activity_schema():
}
return schema


def default_follow_user_schema():
schema = {'id': [not_missing, not_empty, unicode,
convert_user_name_or_id_to_id]}
return schema


def default_follow_dataset_schema():
schema = {'id': [not_missing, not_empty, unicode,
convert_package_name_or_id_to_id]}
Expand Down

0 comments on commit 76495e6

Please sign in to comment.