diff --git a/democracy/api/api_democracy.php b/democracy/api/api_democracy.php
index 8f3c5f8..18bcc9b 100644
--- a/democracy/api/api_democracy.php
+++ b/democracy/api/api_democracy.php
@@ -5,7 +5,8 @@ class api_democracy extends \SYSTEM\API\api_system {
$thead = "
| " . implode(" | ", array_keys($rows[0])) . " |
";
$new_data = "";*/
- $data['files'] = json_decode($data['files']);
+ if(array_key_exists('files', $data)){
+ $data['files'] = json_decode($data['files']);}
$new_data = str_replace('\/', '/',json_encode($data,JSON_PRETTY_PRINT));
//SendMail
$bcc = null;