• This project
    • Loading...
  • Sign in

Marta Miranda / boletin_api

Logo codes
Go to a project
Toggle navigation
  • Projects
  • Groups
  • Snippets
  • Help
Toggle navigation pinning
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
Closed
Merge Request !46 opened 2023-09-13 21:19:11 UTC by Enzo Yair@Ecardenez

Fix/fecha modificacion

Edited 2023-09-15 10:28:50 UTC
Request to merge fix/fecha_modificacion into develop
×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b fix/fecha_modificacion origin/fix/fecha_modificacion

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout develop
git merge --no-ff fix/fecha_modificacion

Step 4. Push the result of the merge to GitLab

git push origin develop

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines

Closed by Enzo Yair 2023-09-15 10:28:50 UTC

The changes were not merged into develop.

  • Discussion 4
  • Commits 7
  • Changes 2
  • Avatar
    Martín Miranda
    @debianitram started a discussion on an outdated diff 2023-09-14 14:21:40 UTC
    Toggle discussion
    project/apps/edicto/api.py
    usuario = self.request.user
     
    serializer.save(cantidad_palabras=cantidad_palabras,
    fecha_actualizacion=datetime.now(),
    fecha_modificacion=datetime.now(),
    • Martín Miranda
      @debianitram commented 2023-09-14 14:21:40 UTC
      Developer

      Por favor, siempre utiliza el módulo timezone de django, timezone.now()

  • Avatar
    Martín Miranda
    @debianitram started a discussion on an outdated diff 2023-09-14 14:23:08 UTC
    Toggle discussion
    project/apps/edicto/serializer.py
    'fecha_modificacion'
     
    )
     
    read_only_fields = ('usuario', 'usuario_movimiento',
    'fecha_publicacion', 'cantidad_palabras',
    'fecha_creacion',
    'fecha_modificacion',
    )
     
    def to_representation(self, instance):
    data = super().to_representation(instance)
    user = self.context['request'].user
    if not user.is_staff:
    data['fecha_publicacion'] = instance.fecha_publicacion
    if instance.fecha_modificacion is not None and self.context['request'].method == 'PUT':
    • Martín Miranda
      @debianitram commented 2023-09-14 14:23:08 UTC
      Developer

      Esto es necesario?

  • Avatar
    Martín Miranda
    @debianitram started a discussion on an outdated diff 2023-09-14 14:23:56 UTC
    Toggle discussion
    project/apps/edicto/migrations/0017_alter_edicto_fecha_modificacion.py 0 → 100644
    # Generated by Django 4.1.9 on 2023-09-13 20:55
    • Martín Miranda
      @debianitram commented 2023-09-14 14:23:56 UTC
      Developer

      En donde está el cambio del modelo para que se genere esta migración?

  • Avatar
    Martín Miranda
    @debianitram started a discussion on an outdated diff 2023-09-14 14:24:14 UTC
    Toggle discussion
    project/apps/edicto/migrations/0016_alter_edicto_fecha_modificacion.py 0 → 100644
    # Generated by Django 4.1.9 on 2023-09-13 20:08
    from django.db import migrations, models
    class Migration(migrations.Migration):
    dependencies = [
    ('edicto', '0015_edicto_usuario_movi'),
    ]
    • Martín Miranda
      @debianitram commented 2023-09-14 14:24:14 UTC
      Developer

      Donde está el cambio en el modelo para que se genere esta migración?

  • Enzo Yair
    @Ecardenez 2023-09-14 14:45:42 UTC

    Added 1 commit:

    • bf8feea9 - cambio de modulo de datatime a timezone.now()
  • Enzo Yair
    @Ecardenez 2023-09-14 14:55:55 UTC

    Added 1 commit:

    • 0d683ba4 - eliminar migraciones
  • Enzo Yair
    @Ecardenez 2023-09-14 15:05:37 UTC

    Added 1 commit:

    • c2aa502c - se cambio de metodo de put a patch
  • Enzo Yair
    @Ecardenez 2023-09-14 15:36:47 UTC

    Added 1 commit:

    • 577470f7 - se quito else de la validacion en el serializer
  • Enzo Yair
    @Ecardenez 2023-09-15 10:16:05 UTC

    Added 1 commit:

    • 740bb130 - se agrego metodo patch
  • Enzo Yair
    @Ecardenez 2023-09-15 10:28:50 UTC

    Status changed to closed

  • Please register or login to post a comment
Enzo Yair
Assignee
Enzo Yair @Ecardenez
Assign to
None
Milestone
None
Assign milestone
1
1 participant
Reference: mvmiranda/boletin_api!46