Skip to content

Commit

Permalink
Merge pull request #334 from portagenetwork/fix/cannot_save_plan
Browse files Browse the repository at this point in the history
Fix/cannot save plan
  • Loading branch information
lagoan authored Mar 28, 2023
2 parents 05c6a80 + 35a70dd commit 8c200f4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 184 deletions.
178 changes: 0 additions & 178 deletions .rake_tasks~
Original file line number Diff line number Diff line change
@@ -1,178 +0,0 @@
about
assets:clean[keep]
assets:clobber
assets:environment
assets:precompile
autoprefixer:info
cache_digests:dependencies
cache_digests:nested_dependencies
clean
clobber
clobber_rdoc
contact_us:copy_locales
contact_us:copy_views
contact_us:install
data_cleanup:clean_invalid_records
data_cleanup:deactivate_orphaned_plans
data_cleanup:find_invalid_records
data_cleanup:find_known_invalidations
db:create
db:delete_potential_spam_accounts
db:delete_users_100_characters
db:delete_users_no_email_mx
db:delete_users_with_http_in_name
db:delete_year_old_accounts_with_no_activity
db:drop
db:fixtures:load
db:migrate
db:migrate:status
db:populate
db:rollback
db:schema:cache:clear
db:schema:cache:dump
db:schema:dump
db:schema:load
db:seed
db:sessions:clear
db:sessions:create
db:sessions:trim
db:setup
db:structure:dump
db:structure:load
db:version
doc:app
factory_bot:lint
gettext:add_language[language]
gettext:find
gettext:pack
gettext:po_to_json
gettext:store_model_attributes
initialize_data:rda_ques
log:clear
logos:resize_all
middleware
migrate:cleanup
migrate:fix_languages
migrate:init_plan_visibility
migrate:move_orcids
migrate:move_shibs
migrate:org_target_url_to_links
migrate:permissions
migrate:plan_data_contacts
migrate:prep_for_1_0
migrate:remove_duplicate_annotations
migrate:seed
migrate:setup
migrate:single_published_template
migrate:to_04
notes
notes:custom
notifications:create_types
rails:template
rails:update
rdoc
rerdoc
roadmap_translation:export_theme_values
rollbar:test
routes
secret
sessions:cleanup
spec
spec:controllers
spec:features
spec:helpers
spec:lib
spec:models
spec:policies
spec:requests
spec:services
stat:build
stat:create:created_plan
stat:create:exported_plan
stat:create:joined_user
stat:create:shared_plan
stat:create_last_month:created_plan
stat:create_last_month:exported_plan
stat:create_last_month:joined_user
stat:create_last_month:shared_plan
stats
templates:clean_up_excess_versions
templates:clean_up_published_flags
templates:set_dirty_flags
test
test:all
test:all:db
test:db
time:zones:all
tmp:clear
tmp:create
tomdoc:app
tomdoc:clear
tomdoc:open
translatable:add_language_to_db[code,name,is_default]
translatable:diffs[code]
translatable:find[domain]
translatable:remove_language_from_db[code]
translation:config
translation:init
translation:sync
translation:sync_and_purge
translation:sync_and_show_purgeable
translation:sync_readonly
upgrade:add_date_question_format
upgrade:add_default_values_v2_0_0
upgrade:add_missing_token_permission_types
upgrade:add_other_org
upgrade:add_reviewer_perm
upgrade:add_reviewer_to_existing_admin_perms
upgrade:add_versioning_id_to_templates
upgrade:check_for_guidance_multiple_themes
upgrade:check_org_contact_emails
upgrade:fill_blank_plan_identifiers
upgrade:fix_default_template
upgrade:fix_question_formats
upgrade:migrate_reviewer_roles
upgrade:normalize_language_formats
upgrade:remove_admin_preferences
upgrade:remove_duplicate_answers
upgrade:remove_duplicated_customised_template_versions
upgrade:remove_duplicated_non_customised_template_versions
upgrade:remove_duplicated_template_versions
upgrade:set_org_links_defaults
upgrade:set_plan_complete
upgrade:set_template_links_defaults
upgrade:set_template_visibility
upgrade:single_guidance_for_theme
upgrade:stats_api_org_admin
upgrade:theme_deduplicate_questions
upgrade:theme_delete_deprecated
upgrade:theme_new_themes
upgrade:theme_remove_migrated
upgrade:theme_transform
upgrade:v0_3_3
upgrade:v1_0_0
upgrade:v1_1_2
upgrade:v2_0_0_part_1
upgrade:v2_0_0_part_2
upgrade:v2_1_0
upgrade:v2_1_2
upgrade:v2_1_3
webpacker
webpacker:binstubs
webpacker:check_binstubs
webpacker:check_node
webpacker:check_yarn
webpacker:clobber
webpacker:compile
webpacker:info
webpacker:install
webpacker:install:angular
webpacker:install:coffee
webpacker:install:elm
webpacker:install:erb
webpacker:install:react
webpacker:install:stimulus
webpacker:install:typescript
webpacker:install:vue
webpacker:verify_install
webpacker:yarn_install
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Changelog

## [3.1.0+portage-3.1.2] - 2023-03-28

### Fixed

- Resolved problem with updating plans [#333](https://github.com/portagenetwork/roadmap/issues/333)

## [3.1.0+portage-3.1.1] - 2023-02-24

### Fixed

- Fixed 500 error when admins try to downloading [#328](https://github.com/portagenetwork/roadmap/issues/328)
- Fixed 500 error when admins try to downloading [#328](https://github.com/portagenetwork/roadmap/issues/328)

## [3.1.0+portage-3.1.0] - 2023-02-22

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

ruby '>= 2.6.3'
ruby '>= 2.7.6'

# ===========#
# CORE RAILS #
Expand Down
5 changes: 5 additions & 0 deletions app/models/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ class Org < ApplicationRecord
# This gives all managed orgs api access whenever saved or updated.
before_save :ensure_api_access, if: ->(org) { org.managed? }

before_validation lambda { |data|
data.sanitize_fields(:name)
data.name&.strip!
}

# If the physical logo file is no longer on disk we do not want it to prevent the
# model from saving. This typically happens when you copy the database to another
# environment. The orgs.logo_uid stores the path to the physical logo file that is
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-development.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
services:
db:
image: mariadb:10.5
image: postgres:12.14
volumes:
- db_volume:/var/lib/mysql
- db_volume:/var/lib/postgresql/data
env_file:
- ./.env
ports:
- '3306:3306'
- '5432:5432'
volumes:
db_volume:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- db

db:
image: mariadb:10.5
image: postgres:12.14
volumes:
- db_volume:/var/lib/mysql
env_file:
Expand Down

0 comments on commit 8c200f4

Please sign in to comment.