Skip to content

Commit

Permalink
fix: broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
albanm committed Dec 12, 2018
1 parent e85f0b2 commit b889602
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/components/DatasetMap.vue
Expand Up @@ -5,7 +5,7 @@

<v-text-field
v-model="query"
style="margin-top: 8px;margin-bottom: 8px;"
style="margin-top: 0;margin-bottom: 8px;"
label="Rechercher"
append-icon="search"
hide-details
Expand Down
2 changes: 1 addition & 1 deletion server/routers/datasets.js
Expand Up @@ -104,7 +104,7 @@ const readDataset = (acceptedStatuses) => asyncWrap(async(req, res, next) => {
if (!req.dataset) return res.status(404).send('Dataset not found')
req.resourceApiDoc = datasetAPIDocs(req.dataset)

if (!acceptedStatuses || acceptedStatuses.includes(req.dataset.status)) return next()
if (req.isNewDataset || !acceptedStatuses || acceptedStatuses.includes(req.dataset.status)) return next()

// dataset found but not in proper state.. wait a little while
await new Promise(resolve => setTimeout(resolve, 100))
Expand Down
2 changes: 1 addition & 1 deletion server/utils/fields-sniffer.js
@@ -1,7 +1,7 @@
const Ajv = require('ajv')
const ajv = new Ajv()

exports.sniff = (values, attachmentsPaths) => {
exports.sniff = (values, attachmentsPaths = []) => {
if (checkAll(values, isOneOf, attachmentsPaths)) return { type: 'string', 'x-refersTo': 'http://schema.org/DigitalDocument' }
if (checkAll(values, isBoolean)) return { type: 'boolean' }
if (checkAll(values, val => intRegexp.test(val))) return { type: 'integer' }
Expand Down

0 comments on commit b889602

Please sign in to comment.