Skip to content
This repository has been archived by the owner on Oct 4, 2018. It is now read-only.

Commit

Permalink
tolerate type taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalex committed Mar 15, 2016
1 parent 11691f7 commit 9a4b9eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validate_doc_update.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function(newDoc, oldDoc, userCtx, secObj) {
// they need it to be analysed in ALT
var betrachtungsdistanzMessage = 'Jede Art der Gruppen "Fauna" und "Flora" braucht ein GIS-Layer und eine Betrachtungsdistanz, d.h.:\n- eine Eigenschaft "Eigenschaftensammlungen" (ein Array)\n- darin eine Eigenschaftensammlung (= Objekt) mit den nötigen Attributen\n\nSiehe diesen Link:\nhttps://gist.github.com/barbalex/d98aad9a96978b137dde\nbzw. dieses vollständige Beispiel:\nhttps://gist.github.com/barbalex/9836162'

if (newDoc.Gruppe && (newDoc.Gruppe === 'Fauna' || newDoc.Gruppe === 'Flora')) {
if (newDoc.Typ && newDoc.Typ === 'Objekt' && newDoc.Gruppe && (newDoc.Gruppe === 'Fauna' || newDoc.Gruppe === 'Flora')) {
// these docs are analysed in ALT
if (!newDoc.Eigenschaftensammlungen) throw({forbidden: betrachtungsdistanzMessage})
if (!newDoc.Eigenschaftensammlungen) throw({forbidden: betrachtungsdistanzMessage})
Expand Down

0 comments on commit 9a4b9eb

Please sign in to comment.