Skip to content

Commit 8e99a1a

Browse files
committed
fix: preview load to determine if class is production no longer overwrites class
1 parent 8aa09fd commit 8e99a1a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Fix Revert not syncing files with IRIS (#789)
2020
- Fix "Export All" stopping prematurely because a tracked item no longer exist in the namespace (#821)
2121
- Import All now outputs a warning instead of an error when an item is in the wrong path (#291)
22+
- Fixed an error where classes with compilation errors would revert to broken versions on export (#830)
2223

2324

2425
## [2.12.2] - 2025-07-08

cls/SourceControl/Git/Production.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,16 +386,16 @@ ClassMethod IsProductionClass(className As %String, nameMethod As %String) As %B
386386
set filename = $classmethod(##class(%Studio.SourceControl.Interface).SourceControlClassGet(), nameMethod, className_".CLS")
387387
if ##class(%File).Exists(filename) && '##class(%File).DirectoryExists(filename) && (##class(%File).GetFileSize(filename) '= 0) {
388388
try {
389-
set ^||%oddDEF=1
389+
set ^||%oddDEF(className) = ""
390390
$$$ThrowOnError($system.OBJ.Load(filename, "-d"))
391391
// class XDatas are stored in ^||%oddDEF("<class name>","x","<XData name>") after temp load
392392
set hasProdDef = $data(^||%oddDEF(className,$$$cCLASSxdata,"ProductionDefinition"))
393-
kill ^||%oddDEF
393+
kill ^||%oddDEF(className)
394394
if hasProdDef {
395395
return 1
396396
}
397397
} catch err {
398-
kill ^||%oddDEF
398+
kill ^||%oddDEF(className)
399399
throw err
400400
}
401401
}

0 commit comments

Comments
 (0)