[PATCH 1 of 3 saem_ref] Use ARK NAA from config in get_store() monkeypatch (CONSEJIRA-668)

Denis Laxalde denis.laxalde at logilab.fr
Wed Feb 6 10:06:33 CET 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1549442711 -3600
#      Wed Feb 06 09:45:11 2019 +0100
# Node ID 5250523a788711581052e770067e2dafca53f266
# Parent  de6a415220c030a6e86dca4e1bc85426d9fb04d3
# Available At http://hg.logilab.org/review/cubes/saem_ref
#              hg pull http://hg.logilab.org/review/cubes/saem_ref -r 5250523a7887
Use ARK NAA from config in get_store() monkeypatch (CONSEJIRA-668)

Value 25651 corresponds to archival department at CD33, this is
a left-over of a previously hard-coded value. Follow-up on 096406495866.

diff --git a/cubicweb_saem_ref/site_cubicweb.py b/cubicweb_saem_ref/site_cubicweb.py
--- a/cubicweb_saem_ref/site_cubicweb.py
+++ b/cubicweb_saem_ref/site_cubicweb.py
@@ -159,7 +159,8 @@ def init_seda_scheme(cnx, title, _count=
 @monkeypatch(seda_dataimport)
 def get_store(cnx):
     from .sobjects import SAEMMetadataGenerator
-    metagen = SAEMMetadataGenerator(cnx, naa_what='25651')
+    what = cnx.vreg.config['default-ark-naa-what']
+    metagen = SAEMMetadataGenerator(cnx, naa_what=what)
     if cnx.repo.system_source.dbdriver == 'postgres':
         from cubicweb.dataimport.massive_store import MassiveObjectStore
         return MassiveObjectStore(cnx, metagen=metagen, eids_seq_range=1000)



More information about the saem-devel mailing list