Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clowdflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Imène Lajili
clowdflows
Commits
625488fa
Commit
625488fa
authored
Feb 06, 2013
by
Anze Vavpetic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added some error checks
parent
24a4e14d
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 @
625488fa
...
...
@@ -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