Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug? self-hosted ui reports version 0.0.0 #202

Open
gabriel-v opened this issue Mar 20, 2024 · 2 comments
Open

bug? self-hosted ui reports version 0.0.0 #202

gabriel-v opened this issue Mar 20, 2024 · 2 comments

Comments

@gabriel-v
Copy link

In profile dropdown

Screenshot from 2024-03-20 18-40-24

But when I get into the container and check the python self-reported version, it works

poetry run python manage.py shell
Python 3.10.13 (main, Mar 12 2024, 12:16:25) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import pkg_resources; pkg_resources.get_distribution('prophecies').version
'0.5.14'
>>> import prophecies
>>> prophecies.VERSION
'0.5.14'
>>> 

I see some js here

return this.$config.get('version', '0.0.0')

Do I need to rebuild some js for version # to take effect?

@pirhoo
Copy link
Member

pirhoo commented Mar 20, 2024

The version is imported from this endpoint:

https://icij.github.io/prophecies/api.html#/operations/List%20Settings

Can you confirm you're not seen it in /api/v1/settings/?

@gabriel-v
Copy link
Author

Ah, the dynamic settings from the admin. Yes I do not see version, only the stuff from the admin form.

I don't see it here either

"orgName": ("ICIJ", "Name of the organization deploying this app"),

But I do see it if I vandalize that table

        (              
        cat <<EOPY    
                      
        import os     
        # on Constance update to v3, import will change to constance.models or something    
        from constance.backends.database.models import Constance                            
        import prophecies                                                                   
        for key in ['appName', 'avatarUrlTemplate', 'loginAccountButton', 'orgName', 'logoutUrl', 'version']:    
            c, _ = Constance.objects.get_or_create(key=key)                                                      
            c.value = prophecies.VERSION if key == 'version' else os.getenv(key)                                 
            c.save()                                                                
            print(c, key, 'setting was set to', os.getenv(key))                     
                                                                   
        EOPY                                                       
        ) | make shell  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants