Skip to content

Commit

Permalink
remove lib.helper dependency for model
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed May 10, 2012
1 parent 36ba5e6 commit 6ce9a0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/model/__init__.py
Expand Up @@ -7,6 +7,7 @@
import vdm.sqlalchemy
from vdm.sqlalchemy.base import SQLAlchemySession
from sqlalchemy import MetaData, __version__ as sqav, Table
from sqlalchemy.util import OrderedDict

import meta
#from domain_object import DomainObjectOperation
Expand All @@ -30,7 +31,6 @@
import term_translation

import ckan.migration
import ckan.lib.helpers as h

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -437,13 +437,13 @@ def _get_revision_user(self):

def revision_as_dict(revision, include_packages=True, include_groups=True,
ref_package_by='name'):
revision_dict = h.OrderedDict((
revision_dict = OrderedDict((
('id', revision.id),
('timestamp', h.datetime_to_date_str(revision.timestamp)),
('timestamp', revision.timestamp.isoformat()),
('message', revision.message),
('author', revision.author),
('approved_timestamp',
h.datetime_to_date_str(revision.approved_timestamp) \
revision.approved_timestamp.isoformat() \
if revision.approved_timestamp else None),
))
if include_packages:
Expand Down

0 comments on commit 6ce9a0a

Please sign in to comment.