Skip to content

Commit

Permalink
Revert "[#2561] Add test to show issue with lazy json and the newer s…
Browse files Browse the repository at this point in the history
…implejson library."

This reverts commit 301efba.
  • Loading branch information
David Read committed Oct 12, 2015
1 parent 34e143b commit ab46d45
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 37 deletions.
9 changes: 1 addition & 8 deletions ckan/lib/lazyjson.py
Expand Up @@ -3,14 +3,7 @@


class LazyJSONObject(dict):
'''An object that behaves like a dict returned from json.loads,
however it will not actually do the expensive decoding from a JSON string
into a dict unless you start treating it like a dict.
This is therefore useful for the situation where there's a good chance you
won't need to use the data in dict form, and all you're going to do is
json.dumps it again, for which your original string is returned.
'''
'''An object that behaves like a dict returned from json.loads'''
def __init__(self, json_string):
self._json_string = json_string
self._json_dict = None
Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/action/get.py
Expand Up @@ -1056,7 +1056,7 @@ def package_show(context, data_dict):
package_dict_validated = False
metadata_modified = pkg.metadata_modified.isoformat()
search_metadata_modified = search_result['metadata_modified']
# solr stores less precise datetime,
# solr stores less precice datetime,
# truncate to 22 charactors to get good enough match
if metadata_modified[:22] != search_metadata_modified[:22]:
package_dict = None
Expand Down
28 changes: 0 additions & 28 deletions ckan/tests/lib/test_lazyjson.py

This file was deleted.

0 comments on commit ab46d45

Please sign in to comment.