Skip to content

Commit 6d2540c

Browse files
authored
Enable reopening applications that have reached the total datacap using the previous approach. (#275)
1 parent 30c471b commit 6d2540c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

fplus-lib/src/core/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3157,7 +3157,10 @@ impl LDNApplication {
31573157
))
31583158
})?;
31593159
return Err(LDNError::Load(information.to_string()));
3160-
} else if app_file.lifecycle.get_state() == AppState::TotalDatacapReached {
3160+
} else if app_file.lifecycle.get_state() == AppState::TotalDatacapReached
3161+
|| (app_file.lifecycle.get_state() == AppState::Granted
3162+
&& !app_file.lifecycle.is_active)
3163+
{
31613164
let new_requested_amount = parse_size_to_bytes(
31623165
&parsed_ldn.datacap.total_requested_amount,
31633166
)
@@ -3223,7 +3226,10 @@ impl LDNApplication {
32233226
let branch_name = LDNPullRequest::application_branch_name(&application_id);
32243227
let uuid = uuidv4::uuid::v4();
32253228

3226-
let pr_title = if app_file.lifecycle.get_state() == AppState::TotalDatacapReached {
3229+
let pr_title = if app_file.lifecycle.get_state() == AppState::TotalDatacapReached
3230+
|| (app_file.lifecycle.get_state() == AppState::Granted
3231+
&& !app_file.lifecycle.is_active)
3232+
{
32273233
format!("Reopen application for {}", parsed_ldn.client.name.clone())
32283234
} else {
32293235
format!("Issue modification for {}", parsed_ldn.client.name.clone())

0 commit comments

Comments
 (0)