Skip to content

Commit

Permalink
fixes / cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
michmuel committed Nov 27, 2023
1 parent 0c52a52 commit 55fb095
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dev/database/fed/disclaimer.json.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"<xsl:value-of select="ili:Language"/>": "<xsl:value-of select="ili:Text"/>"<xsl:if test="not(position() = last())">,</xsl:if>
</xsl:for-each>
},
"extract_index": <xsl:choose><xsl:when test="element-available(ili:AuszugIndex) = 0"><xsl:value-of select="position()"/></xsl:when><xsl:otherwise><xsl:value-of select="ili:AuszugIndex"/></xsl:otherwise></xsl:choose>
"extract_index": <xsl:choose><xsl:when test="ili:AuszugIndex"><xsl:value-of select="ili:AuszugIndex"/></xsl:when><xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise></xsl:choose>
}<xsl:if test="not(position() = last())">,</xsl:if>
</xsl:for-each>
]
Expand Down
2 changes: 1 addition & 1 deletion dev/database/fed/general_information.json.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"<xsl:value-of select="ili:Language"/>": "<xsl:value-of select="ili:Text"/>"<xsl:if test="not(position() = last())">,</xsl:if>
</xsl:for-each>
},
"extract_index": <xsl:choose><xsl:when test="element-available(ili:AuszugIndex) = 0"><xsl:value-of select="position()"/></xsl:when><xsl:otherwise><xsl:value-of select="ili:AuszugIndex"/></xsl:otherwise></xsl:choose>
"extract_index": <xsl:choose><xsl:when test="ili:AuszugIndex"><xsl:value-of select="ili:AuszugIndex"/></xsl:when><xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise></xsl:choose>
}<xsl:if test="not(position() = last())">,</xsl:if>
</xsl:for-each>
]
Expand Down
4 changes: 2 additions & 2 deletions dev/sample_data/ch.disclaimer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"rm": "Supplementarmain a las indicaziuns en quest extract pon restricziuns da la proprietad er esser remartgadas en il register funsil.",
"en": "In addition to the information contained in this extract, ownership restrictions may also be cited in the land register."
},
"extract_index": 1
"extract_index": 10
},
{
"title": {
Expand All @@ -30,7 +30,7 @@
"it": "Il catasto dei siti inquinati (CSIN) è stato elaborato sulla base dei criteri definiti dall'Ufficio federale dell'ambiente (UFAM) e viene continuamente aggiornato sulla base delle nuove conoscenze ottenute (p.es. in seguito a indagini). Le superfici riportate nel CSIN possono discostarsi dalla portata dell'inquinamento effettivo. Se un fondo non figura nel CSIN, non esiste alcuna garanzia assoluta che l'area sia libera da inquinamento dovuto a rifiuti o sostanze nocive. I siti sfruttati per finalità ferroviarie, militari o relative all'aviazione civile rientrano nella sfera di competenze della Confederazione.",
"rm": "Il cataster dals lieus contaminads (CLC) è vegnì fatg tenor ils criteris fixads da l'Uffizi federal d'ambient UFAM e vegn actualisà permanentamain sin basa da novas enconuschientschas (p.ex. retschertgas). Las surfatschas inscrittas en il CLC pon divergiar da la dimensiun effectiva da la contaminaziun. Sch'in bain immobigliar n'è betg inditgà en il CLC, na datti nagina garanzia absoluta che l'areal saja liber da mintga contaminaziun che deriva da rument u da substanzas nuschaivlas. Lieus duvrads per il manaschi da la viafier, per il militar e per l'aviatica tutgan tar il champ da cumpetenza da la Confederaziun."
},
"extract_index": 2
"extract_index": 20
}
]

2 changes: 1 addition & 1 deletion dev/sample_data/ch.general_information.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"it": "Il contenuto del Catasto RDPP si considera noto. Il Canton ${canton} non può essere ritenuto responsabile per la precisione e l'affidabilità dei documenti legislativi in formato elettronico. L'estratto ha carattere puramente informativo e non è in particolare costitutivo di diritti e obblighi. Sono considerati determinante i documenti approvati o pubblicati passati in giudicato. Ulteriori informazioni relative al Catasto RDPP sono disponibili su www.cadastre.ch",
"rm": "Il cuntegn dal cataster RDPP vegn premess sco enconuschent. Il chantun ${canton} n'è betg responsabel per l'exactadad e per la fidadadad dals documents legislativs electronics. L'extract ha in caracter puramain infurmativ e na motivescha cunzunt nagins dretgs e naginas obligaziuns. Giuridicamain liants èn quels documents ch'èn vegnids deliberads u publitgads cun vigur legala. Ulteriuras infurmaziuns davart il cataster RDPP chattais Vus sut www.cadastre.ch"
},
"extract_index": 1
"extract_index": 0
}
]

9 changes: 0 additions & 9 deletions pyramid_oereb/contrib/data_sources/standard/models/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from pyramid_oereb.contrib.data_sources.standard.models import get_office, get_document
from sqlalchemy import Column, PrimaryKeyConstraint, ForeignKey, UniqueConstraint, DateTime
from sqlalchemy import Unicode, String, text, Integer, Boolean, Float
from sqlalchemy.types import UserDefinedType
from geoalchemy2 import Geometry
from sqlalchemy_utils import JSONType
from sqlalchemy.orm import declarative_base, relationship
Expand All @@ -39,11 +38,6 @@
srid = Config.get('srid')


class Serial(UserDefinedType):
def get_col_spec(self, **kw):
return "SERIAL"


class RealEstate(Base):
"""
The container where you can throw in all the real estates this application should have access to, for
Expand Down Expand Up @@ -232,9 +226,6 @@ class Disclaimer(Base):
id = Column(String, primary_key=True)
title = Column(JSONType, nullable=False)
content = Column(JSONType, nullable=False)
# the custom class Serial may be used to obtain an auto incremented extract index in the DB
# however, the better choice was made to make the field optional / nullable
# extract_index = Column(Serial)
extract_index = Column(Integer, nullable=True)


Expand Down

0 comments on commit 55fb095

Please sign in to comment.