Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
New fix for real value problem
· dca59619
SirEdvin
authored
Jan 14, 2018
dca59619
Bump version: 0.3.16 → 0.3.17
· 3e7a3c49
SirEdvin
authored
Jan 14, 2018
3e7a3c49
Hide whitespace changes
Inline
Side-by-side
.bumpversion.cfg
View file @
3e7a3c49
[bumpversion]
current_version
= 0.3.1
6
current_version
= 0.3.1
7
commit
= True
tag
= True
...
...
CHANGELOG.md
View file @
3e7a3c49
...
...
@@ -4,7 +4,13 @@ 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
## [0.3.17] - 2018-01-14
### Fixed
-
Real value gettting for list link field fix again
## [0.3.15] - 2018-01-14
### Fixed
...
...
anji_orm/__init__.py
View file @
3e7a3c49
...
...
@@ -8,7 +8,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
anji_orm/core.py
View file @
3e7a3c49
...
...
@@ -13,7 +13,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/fields/__init__.py
View file @
3e7a3c49
...
...
@@ -6,7 +6,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/fields/base.py
View file @
3e7a3c49
...
...
@@ -17,7 +17,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/fields/relation.py
View file @
3e7a3c49
...
...
@@ -12,7 +12,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
@@ -91,10 +91,9 @@ class LinkListField(AbstractField):
return
value_ids
def
real_value
(
self
,
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
if
self
.
_created_list
is
not
None
:
return
self
.
_fetch_from_model_list
(
model_record
)
return
model_record
.
_values
[
self
.
name
]
async
def
async_format
(
self
,
value
)
->
str
:
# pylint: disable=no-self-use
return
self
.
format
(
await
ensure_element
(
value
))
...
...
@@ -107,7 +106,8 @@ class LinkListField(AbstractField):
if
self
.
name
is
not
None
:
return
self
.
_query_row
return
self
if
not
self
.
_created_list
:
if
self
.
_created_list
is
None
:
self
.
_created_list
=
[]
model_ids
=
instance
.
_values
.
get
(
self
.
name
)
if
model_ids
:
for
model_id
in
model_ids
:
...
...
@@ -116,8 +116,6 @@ class LinkListField(AbstractField):
if
model_id
is
not
None
:
result
=
get_model_and_load_to_cache
(
self
.
_model_class
,
instance
,
model_id
)
self
.
_created_list
.
append
(
result
)
else
:
instance
.
_values
[
self
.
name
]
=
[]
return
self
.
_created_list
def
__set__
(
self
,
instance
,
value
)
->
None
:
...
...
@@ -128,12 +126,13 @@ class LinkListField(AbstractField):
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 list
self
.
_created_list
.
clear
()
if
self
.
_created_list
is
not
None
:
self
.
_created_list
.
clear
()
if
not
value
:
self
.
_created_list
=
[]
instance
.
_values
[
self
.
name
]
=
[]
elif
isinstance
(
value
[
0
],
str
):
self
.
_created_list
=
[]
self
.
_created_list
=
None
instance
.
_values
[
self
.
name
]
=
value
else
:
self
.
_created_list
=
value
...
...
anji_orm/fields/validation.py
View file @
3e7a3c49
...
...
@@ -9,7 +9,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/model.py
View file @
3e7a3c49
...
...
@@ -16,7 +16,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/syntax/__init__.py
View file @
3e7a3c49
...
...
@@ -6,7 +6,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/syntax/indexes.py
View file @
3e7a3c49
...
...
@@ -8,7 +8,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/syntax/parse.py
View file @
3e7a3c49
...
...
@@ -9,7 +9,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/syntax/query.py
View file @
3e7a3c49
...
...
@@ -9,7 +9,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
anji_orm/utils.py
View file @
3e7a3c49
...
...
@@ -7,7 +7,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.1
6
"
__version__
=
"
0.3.1
7
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
...
...
setup.py
View file @
3e7a3c49
...
...
@@ -11,7 +11,7 @@ with open('README.rst') as readme_file:
setup
(
name
=
'
anji-orm
'
,
version
=
'
0.3.1
6
'
,
version
=
'
0.3.1
7
'
,
description
=
"
RethinkDB based ORM
"
,
long_description
=
readme
,
author
=
"
Bogdan Gladyshev
"
,
...
...
source/conf.py
View file @
3e7a3c49
...
...
@@ -59,9 +59,9 @@ author = 'Bogdan Gladyshev'
# built documents.
#
# The short X.Y version.
version
=
'
0.3.1
6
'
version
=
'
0.3.1
7
'
# The full version, including alpha/beta/rc tags.
release
=
'
0.3.1
6
'
release
=
'
0.3.1
7
'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
...
...