|
@@ 614-624 (lines=11) @@
|
| 611 |
|
raise falcon.HTTPError(falcon.HTTP_404, title='API.BAD_REQUEST', |
| 612 |
|
description='API.SPACE_NAME_IS_ALREADY_IN_USE') |
| 613 |
|
|
| 614 |
|
if parent_space_id is not None: |
| 615 |
|
cursor.execute(" SELECT name " |
| 616 |
|
" FROM tbl_spaces " |
| 617 |
|
" WHERE id = %s ", |
| 618 |
|
(new_values['data']['parent_space_id'],)) |
| 619 |
|
row = cursor.fetchone() |
| 620 |
|
if row is None: |
| 621 |
|
cursor.close() |
| 622 |
|
cnx.disconnect() |
| 623 |
|
raise falcon.HTTPError(falcon.HTTP_404, title='API.NOT_FOUND', |
| 624 |
|
description='API.PARENT_SPACE_NOT_FOUND') |
| 625 |
|
|
| 626 |
|
cursor.execute(" SELECT name " |
| 627 |
|
" FROM tbl_timezones " |
|
@@ 190-200 (lines=11) @@
|
| 187 |
|
raise falcon.HTTPError(falcon.HTTP_404, title='API.BAD_REQUEST', |
| 188 |
|
description='API.SPACE_NAME_IS_ALREADY_IN_USE') |
| 189 |
|
|
| 190 |
|
if parent_space_id is not None: |
| 191 |
|
cursor.execute(" SELECT name " |
| 192 |
|
" FROM tbl_spaces " |
| 193 |
|
" WHERE id = %s ", |
| 194 |
|
(new_values['data']['parent_space_id'],)) |
| 195 |
|
row = cursor.fetchone() |
| 196 |
|
if row is None: |
| 197 |
|
cursor.close() |
| 198 |
|
cnx.disconnect() |
| 199 |
|
raise falcon.HTTPError(falcon.HTTP_404, title='API.NOT_FOUND', |
| 200 |
|
description='API.PARENT_SPACE_NOT_FOUND') |
| 201 |
|
|
| 202 |
|
cursor.execute(" SELECT name " |
| 203 |
|
" FROM tbl_timezones " |