Skip to content

Commit

Permalink
Need to add a check for the folder existing.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbur004 committed Aug 23, 2024
1 parent d4a9d26 commit 2f898be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rlib/uoa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def cache_all_team_folder_ids(trace: false)
# @param trace [Boolean] Dump raw results from Dropbox API
def get_team_folder_id(folder_name:, trace: false)
cache_all_team_folder_ids(trace: trace) if @team_folder_id_map.nil?
return nil if @team_folder_id_map[folder_name].nil?

return @team_folder_id_map[folder_name][:team_folder_id]
end

Expand All @@ -299,6 +301,8 @@ def get_team_folder_id(folder_name:, trace: false)
# @param trace [Boolean] Dump raw results from Dropbox API
def team_group_acl(folder_name:, group_name:, trace: false)
cache_all_team_folder_ids(trace: trace) if @team_folder_id_map.nil?
return nil if @team_folder_id_map[folder_name].nil?

return @team_folder_id_map[folder_name][:groups][group_name]
end

Expand Down

0 comments on commit 2f898be

Please sign in to comment.