@@ -523,6 +523,7 @@ class DejaSource(ExternalLicensesSource):
523523 "category" ,
524524 "owner" ,
525525 "text_urls" ,
526+ "language" ,
526527 "osi_url" ,
527528 "faq_url" ,
528529 "other_urls" ,
@@ -668,7 +669,8 @@ def fetch_spdx_license_details(
668669 def patch_spdx_license (self , api_url , license_key , spdx_license_key ):
669670 """
670671 PATCH the DejaCode ``license_key`` to set the ``spdx_license_key``
671- using the DejaCode API Raise an exception on failure.
672+ using the DejaCode API.
673+ Raise an exception on failure.
672674 """
673675 headers = {
674676 "Authorization" : f"Token { self .api_key } " ,
@@ -891,6 +893,7 @@ def license_to_dict(lico):
891893 name = lico .name ,
892894 owner = lico .owner ,
893895 is_exception = lico .is_exception ,
896+ language = lico .language or "en" ,
894897 full_text = lico .text ,
895898 spdx_license_key = lico .spdx_license_key ,
896899 reference_notes = lico .notes ,
@@ -1351,6 +1354,7 @@ def synchronize_licenses(
13511354
13521355 added_to_external = [externals_by_key [k ] for k in added_to_external ]
13531356 updated_in_external = [externals_by_key [k ] for k in updated_in_external ]
1357+ external_source .externals_by_key = externals_by_key
13541358 return added_to_external , updated_in_external
13551359
13561360
@@ -1439,9 +1443,6 @@ def cli(
14391443 api_url = external_source .api_base_url
14401444 api_key = external_source .api_key
14411445 for i , new_lic in enumerate (added_to_external ):
1442- if i == 2 :
1443- break
1444-
14451446 if new_lic .key in dejacode_special_skippable_keys :
14461447 continue
14471448 if TRACE :
@@ -1451,8 +1452,6 @@ def cli(
14511452 if update_external :
14521453 externals_by_key = external_source .externals_by_key
14531454 for i , modified_lic in enumerate (updated_in_external ):
1454- if i == 2 :
1455- break
14561455 if modified_lic .key in dejacode_special_skippable_keys :
14571456 continue
14581457 mold = license_to_dict (modified_lic )
0 commit comments