inventaire / inventaire-client

webapp coupled to the inventaire server :books:
https://inventaire.io
49 stars 16 forks source link

fix import of editions without isbn or external id #331

Closed maxlath closed 1 year ago

maxlath commented 2 years ago

This is done by generalizing the use of the resolver to create entities from edition+works+authors seeds, which would be made possible by https://github.com/inventaire/inventaire/pull/636

This would solve the issue of edition seeds without isbn and without other edition identifiers, such as is the case with LibraryThings entries, which have a work id but no edition id. Example with this export sample, which currently generates an error but would work after this PR:

{
  "220092936": {
    "books_id": "220092936",
    "title": "Die Papstin : Roman",
    "sortcharacter": "5",
    "public": "true",
    "primaryauthor": "Cross, Donna Woolfolk",
    "secondaryauthor": "Neuhaus, Wolfgang",
    "authors": [{
      "lf": "Cross, Donna Woolfolk",
      "fl": "Donna Woolfolk Cross"
    }, {
      "lf": "Neuhaus, Wolfgang",
      "fl": "Wolfgang Neuhaus"
    }],
    "collections_idA": [1],
    "collections": ["Your library"],
    "publication": "Berlin : Aufbau-Verl., 2002.",
    "date": "2002",
    "summary": "Die Papstin : Roman by Donna Woolfolk Cross (2002)",
    "language": ["German"],
    "language_codeA": ["ger"],
    "originallanguage": ["English"],
    "originallanguage_codeA": ["ger", "eng"],
    "lcc": [],
    "subject": [
      ["Johanna"]
    ],
    "source": "Gemeinsamer Bibliotheksverbund (GBV)",
    "workcode": "28465448",
    "entrydate": "2022-07-08",
    "format": [{
      "code": "1.1",
      "text": "Gedrucktes Buch"
    }],
    "copies": "1",
    "volumes": "1",
    "physical_description": "20 cm",
    "height": "20 cm",
    "dimensions": "20 cm"
  }
}