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
Eligibility Start: Show Veteran-flow specific bullet copy #1459
Eligibility Start: Show Veteran-flow specific bullet copy #1459
Conversation
dafd3db
to
2e0d625
Compare
@thekaveman @angela-tran Posting this question here for posterity: In this latest commit, f548b4b, I'm trying to do the following:
When I do just these two things, and run When, however, I try to add a Any ideas? I was thinking maybe I have... some sort of syntax error or declaring the Full stacktrace: calitp@cdbe8faf8c05:~/app$ bin/makemigrations.sh
+ mkdir -p benefits/core/old_migrations
+ mv benefits/core/migrations/0001_initial.py benefits/core/migrations/0002_data.py benefits/core/migrations/__init__.py benefits/core/migrations/sample_agency.json benefits/core/old_migrations
+ cp benefits/core/old_migrations/__init__.py benefits/core/migrations
+ python manage.py makemigrations
Migrations for 'core':
benefits/core/migrations/0001_initial.py
- Create model AuthProvider
- Create model EligibilityType
- Create model EligibilityVerifier
- Create model PaymentProcessor
- Create model PemData
- Create model TransitAgency
- Add field client_cert to paymentprocessor
- Add field client_cert_private_key to paymentprocessor
- Add field client_cert_root_ca to paymentprocessor
- Add field public_key to eligibilityverifier
+ cp benefits/core/old_migrations/0001_initial.py benefits/core/old_migrations/0002_data.py benefits/core/old_migrations/__init__.py benefits/core/old_migrations/sample_agency.json benefits/core/migrations --no-clobber --recursive
+ rm -rf benefits/core/old_migrations
+ python -m black benefits/core/migrations/0001_initial.py benefits/core/migrations/0002_data.py benefits/core/migrations/__init__.py
All done! ✨ 🍰 ✨
3 files left unchanged. calitp@cdbe8faf8c05:~/app$ bin/init.sh
+ rm -f django.db
+ python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, core, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying core.0001_initial... OK
Applying core.0002_data...Traceback (most recent call last):
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/migrations/migration.py", line 132, in apply
operation.database_forwards(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
self.code(from_state.apps, schema_editor)
File "/home/calitp/app/benefits/core/migrations/0002_data.py", line 180, in load_data
mst_veteran_verifier = EligibilityVerifier.objects.create(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/query.py", line 658, in create
obj.save(force_insert=True, using=self.db)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/base.py", line 814, in save
self.save_base(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/base.py", line 877, in save_base
updated = self._save_table(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/base.py", line 1020, in _save_table
results = self._do_insert(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/base.py", line 1061, in _do_insert
return manager._insert(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1819, in execute_sql
for sql, params in self.as_sql():
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1743, in as_sql
value_rows = [
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1744, in <listcomp>
[
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1745, in <listcomp>
self.prepare_value(field, self.pre_save_val(field, obj))
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1684, in prepare_value
return field.get_db_prep_save(value, connection=self.connection)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/fields/json.py", line 134, in get_db_prep_save
return self.get_db_prep_value(value, connection)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/models/fields/json.py", line 129, in get_db_prep_value
return connection.ops.adapt_json_value(value, self.encoder)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/base/operations.py", line 584, in adapt_json_value
return json.dumps(value, cls=encoder)
File "/usr/local/lib/python3.10/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type __proxy__ is not JSON serializable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/calitp/app/manage.py", line 21, in <module>
main()
File "/home/calitp/app/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/calitp/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/home/calitp/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/calitp/.local/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/calitp/.local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/home/calitp/.local/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/home/calitp/.local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 356, in handle
post_migrate_state = executor.migrate(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 249, in apply_migration
with self.connection.schema_editor(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", line 38, in __exit__
self.connection.check_constraints()
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 244, in check_constraints
violations = cursor.execute("PRAGMA foreign_key_check").fetchall()
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 83, in _execute
self.db.validate_no_broken_transaction()
File "/home/calitp/.local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 531, in validate_no_broken_transaction
raise TransactionManagementError(
django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block. |
@thekaveman @angela-tran ready for review While pairing with @angela-tran, we changed the following:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
…ifier; add Bullets data to Vet EV
2db41b0
e2dbfaf
to
2db41b0
Compare
closes #1441
This PR does not change any CSS. It looks like some indentation has changed on this screen.
What this PR does
bullets
an optionalJSONField
to theEligibilityVerifer
model and migrationsbullets
data with the strings of themsgid
s for the Eligibility Start page MediaItem's bullets, for VA, Login.gov (MST, SacRT)This PR makes model changes
How to run this PR locally
How to test
Screenshots