Skip to content

Logic question #42

@GuySchnidrig

Description

@GuySchnidrig

@damian-oswald

Logic question on line 82 in create_products.py on 36-check-data-integrity-product---organisation

        # Case 1: Regular Product or Sale Permission
          if raw_type in ["REGULAR", "SALE_PERMISSION"]:
              if pd.notna(row.get("w_number")):
                  w_number_str = str(row.get("w_number")).strip()
                  # Apply W- prefix (W-numbers only have the prefix for parallel products...)
                  fed_adm_num = f"W-{w_number_str}"
                  graph.add((product_uri, BASE.federalAdmissionNumber, Literal(fed_adm_num, datatype=XSD.string)))

product:00260F63-207E-4675-B8C8-851AA2603AEB a :ParallelImport ;
    schema1:name "Titus 25 DF"@de ;
    :federalAdmissionNumber "D-7254"^^xsd:string ;
    :foreignAdmissionNumber "034273-00/065"^^xsd:string ;
    :packageInsertNumber "4521"^^xsd:string ;
    :producingCountry country:DEU ;
    :referenceProduct product:10645A4A-908F-40E6-BEA1-26D35A370235 .

product:007E8933-BEE8-44EF-93FC-B670703F7D5E a :SalePermission ;
    schema1:name "MIOPLANT Rasen-Unkrautvertilger"@de ;
    :exhaustionDeadline "2026-10-31"^^xsd:date ;
    :federalAdmissionNumber "W-6719-1"^^xsd:string ;
    :producingCountry country:CHE ;
    :referenceProduct product:2A7FA096-6AD4-48B0-9FE6-66F0FA6BCFFA ;
    :soldOutDeadline "2025-10-31"^^xsd:date .

Is this the right way around? the code makes the prefix for regular and sales - not parallel

Metadata

Metadata

Assignees

No one assigned

    Labels

    SMEAny issue that requires the attention of subject matter experts (Fachleute)help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions