Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 647
    • Issues 647
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 88
    • Merge requests 88
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Issues
  • #2001
Closed
Open
Issue created Jul 30, 2020 by Roman Chvanikov@chvanikoffDeveloper

Config.get/2 behaves differently for `nil` values

if list is given as key and actual config value is nil, then default value will be returned.

if an atom is given as key and actual config value is nil, then nil will be returned.

config :pleroma,
  wakawaka: nil

config :pleroma,
  makamaka: %{lorem: nil}
iex(master_daadc62f@127.0.0.1)1> Pleroma.Config.get(:wakawaka, :wut)
nil
iex(master_daadc62f@127.0.0.1)2> Pleroma.Config.get([:makamaka, :lorem], :wut)
:wut

We should probably unify the behaviour, any objections?

Assignee
Assign to
Time tracking