Skip to content

Commit

Permalink
[#3022] Add a default value to package type field
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 20, 2012
1 parent c26b7b8 commit e0984a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/model/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
Column('maintainer_email', types.UnicodeText),
Column('notes', types.UnicodeText),
Column('license_id', types.UnicodeText),
Column('type', types.UnicodeText),
Column('type', types.UnicodeText, default=u'dataset'),
Column('owner_org', types.UnicodeText),
Column('private', types.Boolean, default=False),
)
Expand Down Expand Up @@ -217,6 +217,7 @@ def as_dict(self, ref_package_by='name', ref_group_by='name'):
_dict['metadata_created'] = self.metadata_created.isoformat() \
if self.metadata_created else None
_dict['notes_rendered'] = ckan.misc.MarkdownFormat().to_html(self.notes)
_dict['type'] = self.type if self.type else u'dataset'
#tracking
import ckan.model as model
tracking = model.TrackingSummary.get_for_package(self.id)
Expand Down

0 comments on commit e0984a7

Please sign in to comment.