[Diff][Fixed] Problems when using an output and no variant specified

This commit is contained in:
Salvador E. Tropea 2023-03-29 07:03:23 -03:00
parent 895d852ed2
commit 9f2564b80c
2 changed files with 7 additions and 1 deletions

View File

@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- PCB Print:
- Interference between the visible layers in the PRL file and the results
when scaling. (#407)
- Diff:
- Problems when using an output and no variant specified.
## [1.6.1] - 2023-03-16

View File

@ -390,7 +390,11 @@ class DiffOptions(BaseOptions):
if not out._done:
run_output(out)
res = self.cache_file(fname)
self.git_hash = out.options.variant.file_id if self.use_file_id else out.options.variant.name+'_variant'
variant = out.options.variant
if variant is None:
self.git_hash = 'no_variant'
else:
self.git_hash = variant.file_id if self.use_file_id else variant.name+'_variant'
return res
def cache_current(self):