Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3e73e11c
authored
Jul 10, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for string results for compatibility w/ legacy interface
parent
93218515
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
circle/common/models.py
+7
-0
No files found.
circle/common/models.py
View file @
3e73e11c
...
@@ -21,6 +21,7 @@ from hashlib import sha224
...
@@ -21,6 +21,7 @@ from hashlib import sha224
from
itertools
import
chain
,
imap
from
itertools
import
chain
,
imap
from
logging
import
getLogger
from
logging
import
getLogger
from
time
import
time
from
time
import
time
from
warnings
import
warn
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.core.cache
import
cache
from
django.core.cache
import
cache
...
@@ -173,6 +174,12 @@ class ActivityModel(TimeStampedModel):
...
@@ -173,6 +174,12 @@ class ActivityModel(TimeStampedModel):
@result.setter
@result.setter
def
set_result
(
self
,
value
):
def
set_result
(
self
,
value
):
if
isinstance
(
value
,
basestring
):
warn
(
"Using string as result value is deprecated. Use "
"HumanReadableObject instead."
,
DeprecationWarning
)
value
=
create_readable
(
user_text_template
=
""
,
admin_text_template
=
value
)
self
.
result_data
=
None
if
value
is
None
else
value
.
to_dict
()
self
.
result_data
=
None
if
value
is
None
else
value
.
to_dict
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment