Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Imène Lajili
clowdflows
Commits
85354330
Commit
85354330
authored
Feb 06, 2013
by
Anze Vavpetic
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mysql' into dev
parents
3d44fd21
625488fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
workflows/mysql/context.py
workflows/mysql/context.py
+4
-0
No files found.
workflows/mysql/context.py
View file @
85354330
...
...
@@ -77,6 +77,8 @@ class DBContext:
self
.
target_att
=
postdata
.
get
(
'target_att%s'
%
widget_id
)[
0
]
self
.
target_att_val
=
postdata
.
get
(
'target_att_val%s'
%
widget_id
)[
0
]
self
.
tables
=
postdata
.
get
(
'tables%s'
%
widget_id
,
[])
if
self
.
target_table
not
in
self
.
tables
:
raise
Exception
(
'The selected target table "%s" is not among the selected tables.'
%
self
.
target_table
)
# Propagate the selected tables
for
table
in
self
.
cols
.
keys
():
if
table
not
in
self
.
tables
:
...
...
@@ -87,6 +89,8 @@ class DBContext:
del
self
.
connected
[
pair
]
for
table
in
self
.
tables
:
self
.
cols
[
table
]
=
postdata
.
get
(
'%s_columns%s'
%
(
table
,
widget_id
),
[])
if
table
==
self
.
target_table
and
self
.
target_att
not
in
self
.
cols
[
table
]:
raise
Exception
(
'The selected target attribute ("%s") is not among the columns selected for the target table ("%s").'
%
(
self
.
target_att
,
self
.
target_table
))
def
__repr__
(
self
):
return
str
((
self
.
target_table
,
self
.
target_att
,
self
.
tables
,
self
.
cols
,
self
.
connected
))
...
...
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