Skip to content
Commits on Source (3)
[bumpversion]
current_version = 0.3.14
current_version = 0.3.15
commit = True
tag = True
......
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [0.3.15] - 2017-01-14
### Fixed
- Real value getting for list link field
## [0.3.14] - 2018-01-11
### Added
......@@ -202,7 +208,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Ability to skip database setup when load register
[Unreleased]: https://gitlab.com/AnjiProject/anji-core/compare/v0.3.14...HEAD
[Unreleased]: https://gitlab.com/AnjiProject/anji-core/compare/v0.3.15...HEAD
[0.3.15]: https://gitlab.com/AnjiProject/anji-core/compare/v0.3.14...v0.3.15
[0.3.14]: https://gitlab.com/AnjiProject/anji-core/compare/v0.3.13...v0.3.14
[0.3.13]: https://gitlab.com/AnjiProject/anji-core/compare/v0.3.12...v0.3.13
[0.3.12]: https://gitlab.com/AnjiProject/anji-core/compare/v0.3.11...v0.3.12
......
......@@ -8,7 +8,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......@@ -13,7 +13,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -6,7 +6,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -17,7 +17,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -12,7 +12,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......@@ -91,7 +91,10 @@ class LinkListField(AbstractField):
return value_ids
def real_value(self, model_record):
return self._fetch_from_model_list(model_record)
value_ids = model_record._values[self.name]
if value_ids != list(map(lambda x: x.id, self._created_list)):
value_ids = self._fetch_from_model_list(model_record)
return value_ids
async def async_format(self, value) -> str: # pylint: disable=no-self-use
return self.format(await ensure_element(value))
......@@ -124,10 +127,11 @@ class LinkListField(AbstractField):
for value_record in value:
if not isinstance(value_record, (self._model_class, asyncio.Future, str)):
raise ValueError(f"This field only for model for {self._model_class}")
# None value should be converted to empty dict
# None value should be converted to empty list
self._created_list.clear()
if not value:
self._created_list = []
instance._values[self.name] = []
elif isinstance(value[0], str):
self._created_list = []
instance._values[self.name] = value
......
......@@ -9,7 +9,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -16,7 +16,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -6,7 +6,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -8,7 +8,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -9,7 +9,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -9,7 +9,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -7,7 +7,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__ = "Copyright 2017, Bogdan Gladyshev"
__credits__ = ["Bogdan Gladyshev"]
__license__ = "MIT"
__version__ = "0.3.14"
__version__ = "0.3.15"
__maintainer__ = "Bogdan Gladyshev"
__email__ = "siredvin.dark@gmail.com"
__status__ = "Production"
......
......@@ -11,7 +11,7 @@ with open('README.rst') as readme_file:
setup(
name='anji-orm',
version='0.3.14',
version='0.3.15',
description="RethinkDB based ORM",
long_description=readme,
author="Bogdan Gladyshev",
......
......@@ -59,9 +59,9 @@ author = 'Bogdan Gladyshev'
# built documents.
#
# The short X.Y version.
version = '0.3.14'
version = '0.3.15'
# The full version, including alpha/beta/rc tags.
release = '0.3.14'
release = '0.3.15'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......