File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
fplus-lib/src/core/allocator Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ fn content_items_to_allocator_model(file: ContentItems) -> Result<AllocatorModel
56
56
57
57
match decode_allocator_model ( & cleaned_content) {
58
58
Some ( mut model) => {
59
- let owner_repo_parts: Vec < & str > = model. application . allocation_bookkeeping . split ( '/' ) . collect ( ) ;
59
+ let mut owner_repo_parts: Vec < & str > = model. application . allocation_bookkeeping . split ( '/' ) . collect ( ) ;
60
+ // If last part is empty, remove it
61
+ if owner_repo_parts[ owner_repo_parts. len ( ) - 1 ] . is_empty ( ) {
62
+ owner_repo_parts. pop ( ) ;
63
+ }
60
64
if owner_repo_parts. len ( ) < 2 {
61
65
log:: error!( "Failed to parse allocator model" ) ;
62
66
return Err ( LDNError :: Load ( "Failed to parse allocator model" . to_string ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments