Skip to content

Commit

Permalink
Merge pull request #75 from CommonGateway/fix/XZ-152/test-results
Browse files Browse the repository at this point in the history
Fixes resulting from tests with Roxit
  • Loading branch information
rjzondervan authored Aug 18, 2023
2 parents 923ba75 + 457544b commit 5346992
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
12 changes: 4 additions & 8 deletions Installation/Schema/zrc/zrc.objectIdentificatie.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,25 @@
"title": "identificatie",
"description": "De unieke identificatie van het OBJECT.",
"type": "string",
"maxLength": 100,
"required": true
"maxLength": 100
},
"wplWoonplaatsNaam": {
"type": "string",
"title": "wpl woonplaats naam",
"description": "De unieke identificatie van het OBJECT",
"maxLength": 80,
"required": true
"maxLength": 80
},
"gorOpenbareRuimteNaam": {
"type": "string",
"title": "gor openbare ruimte naam",
"description": "Een door het bevoegde gemeentelijke orgaan aan een OPENBARE RUIMTE toegekende benaming",
"maxLength": 80,
"required": true
"maxLength": 80
},
"huisnummer": {
"type": "integer",
"title": "huisnummer",
"minimum": 0,
"maximum": 99999,
"required": true
"maximum": 99999
},
"huisletter": {
"type": "string",
Expand Down
8 changes: 4 additions & 4 deletions Service/DRCService.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public function inhoudHandler(array $data, array $configuration): array
$file->setBase64($data['inhoud']);
} else if (
(
($data['inhoud'] === null || filter_var($data['inhoud'], FILTER_VALIDATE_URL) === $data['inhoud'])
($data['inhoud'] === null || filter_var($data['inhoud'], FILTER_VALIDATE_URL) === $data['inhoud'] || $data['inhoud'] === '')
&& ($data['link'] === null || $data['link'] === '')
)
&& isset($this->data['body']['bestandsomvang']) === true
Expand Down Expand Up @@ -440,13 +440,13 @@ public function inhoudHandler(array $data, array $configuration): array

$this->entityManager->persist($file);

$now = new \DateTime();
if ($this->data['method'] === 'POST') {
$objectEntity->hydrate(['bestandsdelen' => $fileParts, 'lock' => $lock, 'locked' => true, 'inhoud' => $this->generateDownloadEndpoint($objectId, $downloadEndpoint)]);
$objectEntity->hydrate(['bestandsdelen' => $fileParts, 'lock' => $lock, 'locked' => true, 'inhoud' => $this->generateDownloadEndpoint($objectEntity->getId()->toString(), $downloadEndpoint)]);
} else {
$objectEntity->hydrate(['bestandsdelen' => $fileParts, 'inhoud' => $this->generateDownloadEndpoint($objectId, $downloadEndpoint)]);
$objectEntity->hydrate(['bestandsdelen' => $fileParts, 'inhoud' => $this->generateDownloadEndpoint($objectEntity->getId()->toString(), $downloadEndpoint), 'beginRegistratie' => $now->format('c')]);
}


$this->entityManager->persist($objectEntity);
$this->entityManager->flush();

Expand Down

0 comments on commit 5346992

Please sign in to comment.