@@ -30,15 +30,16 @@ module default {
30
30
.step >= Project::Step.PendingFinanceConfirmation
31
31
) then ((
32
32
with block := (
33
- if __subject__ is MultiplicationTranslationProject then (
34
- assert_exists(
35
- assert_exists(
36
- (select __subject__.partnerships filter .primary).partner,
37
- message := "Project must have a primary partnership"
38
- ).departmentIdBlock,
33
+ if __subject__ is MultiplicationTranslationProject then ((
34
+ with primaryPartnership := assert_exists(
35
+ __subject__.primaryPartnership,
36
+ message := "Project must have a primary partnership"
37
+ )
38
+ select assert_exists(
39
+ primaryPartnership.partner.departmentIdBlock,
39
40
message := "Available Department IDs have not been declared"
40
41
)
41
- ) else (
42
+ )) else (
42
43
assert_exists(
43
44
assert_exists(
44
45
__subject__.primaryLocation,
@@ -102,6 +103,13 @@ module default {
102
103
link rootDirectory: Directory;
103
104
104
105
partnerships := .<project[is Partnership];
106
+ primaryPartnership := (
107
+ # avoiding backlink here because of partial path resolution bug
108
+ # https://github.com/geldata/gel/issues/8633
109
+ select Partnership
110
+ filter Partnership.primary and Partnership.project = __source__
111
+ limit 1
112
+ );
105
113
106
114
overloaded link projectContext: Project::Context {
107
115
default := (insert Project::Context {
0 commit comments