handle change to Civitai metadata schema for commercial usage

This commit is contained in:
Lincoln Stein
2024-02-27 23:54:28 -05:00
committed by psychedelicious
parent 4b4b940461
commit 94e3857110
4 changed files with 9 additions and 6 deletions

View File

@ -160,7 +160,7 @@ class CivitaiMetadataFetch(ModelMetadataFetchBase):
nsfw=model_json["nsfw"],
restrictions=LicenseRestrictions(
AllowNoCredit=model_json["allowNoCredit"],
AllowCommercialUse=CommercialUsage(model_json["allowCommercialUse"]),
AllowCommercialUse={CommercialUsage(x) for x in model_json["allowCommercialUse"]},
AllowDerivatives=model_json["allowDerivatives"],
AllowDifferentLicense=model_json["allowDifferentLicense"],
),