Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Mark new files as unmodified
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Mar 30, 2017
1 parent adc9842 commit 8064397
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yorm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
from .mixins import ModelMixin

__project__ = 'YORM'
__version__ = '1.4dev3'
__version__ = '1.4dev4'
1 change: 1 addition & 0 deletions yorm/tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def it_creates_files(model_class):
instance = utilities.create(model_class, 'foo', 'bar')

expect(instance.__mapper__.exists) == True
expect(instance.__mapper__.modified) == False

def it_requires_files_to_not_yet_exist(model_class, instance):
instance.__mapper__.create()
Expand Down
2 changes: 1 addition & 1 deletion yorm/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create(class_or_instance, *args, overwrite=False, **kwargs):
msg = "{!r} already exists".format(mapper.path)
raise exceptions.DuplicateMappingError(msg)

return save(instance)
return load(save(instance))


def find(class_or_instance, *args, create=False, **kwargs): # pylint: disable=redefined-outer-name
Expand Down

0 comments on commit 8064397

Please sign in to comment.